|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMapping
org.datanucleus.store.mapped.mapping.ObjectAsStringMapping
org.datanucleus.store.mapped.mapping.LocaleMapping
public class LocaleMapping
Mapping for Locale type. Locale should be stored in colums from 2 to 20 characters. Normaly, we will have a string no longer than 5 characters, but variants, in general, are vendor specific and can be longer than expected. The Variant codes are vendor and browser-specific. For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX. Where there are two variants, separate them with an underscore, and put the most important one first. For example, a Traditional Spanish collation might construct a locale with parameters for language, country and variant as: "es", "ES", "Traditional_WIN". language_country_variant Examples: "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr_MAC"
Locale| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
LocaleMapping()
|
|
| Method Summary | |
|---|---|
int |
getDefaultLength(int index)
Method to return the default length of this type in the datastore. |
java.lang.Class |
getJavaType()
Method to return the Java type. |
java.lang.Object |
getSampleValue(ClassLoaderResolver clr)
Return a sample value of the mapping type to be used for internal evaluation of type/conversion. |
protected java.lang.String |
objectToString(java.lang.Object object)
Method to set the datastore string value based on the object value. |
protected java.lang.Object |
stringToObject(java.lang.String datastoreValue)
Method to extract the objects value from the datastore string value. |
| Methods inherited from class org.datanucleus.store.mapped.mapping.ObjectAsStringMapping |
|---|
getJavaTypeForDatastoreMapping, getObject, newLiteral, newScalarExpression, setObject |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping |
|---|
equals, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocaleMapping()
| Method Detail |
|---|
public java.lang.Object getSampleValue(ClassLoaderResolver clr)
JavaTypeMapping
getSampleValue in class JavaTypeMappingclr - ClassLoader resolver
public java.lang.Class getJavaType()
ObjectAsStringMapping
getJavaType in class ObjectAsStringMappingpublic int getDefaultLength(int index)
getDefaultLength in class SingleFieldMappingindex - The index position
protected java.lang.String objectToString(java.lang.Object object)
objectToString in class ObjectAsStringMappingobject - The object
protected java.lang.Object stringToObject(java.lang.String datastoreValue)
stringToObject in class ObjectAsStringMappingdatastoreValue - Value obtained from the datastore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||