1 22 23 package org.xquark.mapper.mapping; 24 25 import org.xquark.mapping.StorageContext; 26 import org.xquark.mapping.UserGenerator; 27 28 class ConstantGenerator implements UserGenerator 29 { 30 private static final String RCSRevision = "$Revision: 1.1 $"; 31 private static final String RCSName = "$Name: $"; 32 private String constant; 33 34 ConstantGenerator(String constant) { this.constant = constant; } 35 36 public Object getValue(StorageContext context) { return constant; } 37 38 public String getXMLType() 39 { 40 return "<simpleType base=\"string\"><maxLength =\"" 41 + constant.length() + "\"></simpleType>"; 42 } 43 44 } 45 | Popular Tags |