|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xquark.mapping.KeyGenerator
This generator is a built-in default implementation intended as a device for relational primary and foreign keys generation. It uses the compilation context to get the needed parameters, especially for initialization. WARNING !!! Currently, this generator is limited: it uses the target column provided by the compilation context to initialize a counter (performing a 'SELECT MAX(...) FROM ...' which is totally managed in memory (using 1 increments). This has the advantage to be extremely rapid (no useless database access, JDBC batch usable...) but the major drawback of this approach is the fact that concurrency in insertion is not supported...
Constructor Summary | |
KeyGenerator(CompilationContext properties)
|
Method Summary | |
java.lang.Object |
getValue(StorageContext context)
This method is called by the XQuark storage engine when a user-generated column of a relational table is filled. |
java.lang.String |
getXMLType()
Return the corresponding XML Schema type using the XML Schema recommendation syntax. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyGenerator(CompilationContext properties)
Method Detail |
public java.lang.String getXMLType()
UserGenerator
You must not use the the prefix for XML Schema namespace which is implicitly defined
.Examples:/B>
string
decimal
getXMLType
in interface UserGenerator
public java.lang.Object getValue(StorageContext context)
Generator
XML schema base built-in primitive type | Java class |
---|---|
string | String |
boolean | Boolean |
decimal | BigDecimal or Long if type facet ensure it fits. |
float | Float |
double | Double |
QName | org.xquark.schema.datatypes.QName |
NOTATION | org.xquark.schema.datatypes.QName |
duration | org.xquark.schema.datatypes.Duration |
dateTime | org.xquark.schema.datatypes.DateTime |
time | org.xquark.schema.datatypes.DateTime |
date | org.xquark.schema.datatypes.DateTime |
gYearMonth | org.xquark.schema.datatypes.DateTime |
gYear | org.xquark.schema.datatypes.DateTime |
gMonthDay | org.xquark.schema.datatypes.DateTime |
gDay | org.xquark.schema.datatypes.DateTime |
gMonth | org.xquark.schema.datatypes.DateTime |
hexBinary | org.xquark.schema.datatypes.ByteArray |
base64Binary | org.xquark.schema.datatypes.ByteArray |
anyURI | org.xquark.schema.datatypes.URI |
union | not supported |
list | List |
anySimpleType | String |
getValue
in interface Generator
context
- Passed by the mapping algorithm to provide an access
to storage system variables.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |