org.xquark.mapping
Interface UserGenerator

All Superinterfaces:
Generator

public interface UserGenerator
extends Generator

This Interface must be implemented by custom mapping users when a column of a relational table must be filled with a custom generated value.

Warning !

User must also supply an object inplementing the TypeInfo interface for this generator.


Method Summary
 java.lang.Object getValue(StorageContext context)
          This method is called by the custom XMLCollection storage algorithm 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.
 

Method Detail

getValue

public java.lang.Object getValue(StorageContext context)
This method is called by the custom XMLCollection storage algorithm when a user-generated column of a relational table is filled. The Object type returned must be consistent with column target SQL type.

Specified by:
getValue in interface Generator
Parameters:
context - Passed by the mapping algorithm to provide an access to storage system variables.
Returns:
An Object, that must be, from a JDBC 2.0 point of view, consistent with column target SQL type.

getXMLType

public java.lang.String getXMLType()
Return the corresponding XML Schema type using the XML Schema recommendation syntax.

You must not use the the prefix for XML Schema namespace which is implicitly defined

.

Examples:/B>

string

decimal

]]>

Returns:
an XML Schema fragment describing a simple type


Copyright © 2003 Université de Versailles Saint-Quentin, XQuark Group. All rights reserved.