|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An extension of the general SchemaType for simple types.
Field Summary | |
static int |
OP_INSERT
A possible mode for createPrepareStatement: The value is inserted into the database. |
static int |
OP_UPDATE
A possible mode for createPrepareStatement: The value is updated in the database. |
static int |
OP_WHERE
A possible mode for createPrepareStatement: The value is used in a where clause. |
Method Summary | |
java.lang.String |
castFromResultSet(java.lang.String pResultSet,
int num)
Returns a piece of Java code reading an instance of this type from a ResultSet. |
java.lang.String |
castFromString(java.lang.String pValue,
java.lang.String pUnmarshaller)
Returns a piece of Java code converting a String into an an instance of this type. |
java.lang.String |
castToPreparedStatement(java.lang.String pStatement,
java.lang.String pValue,
int num)
Returns a piece of Java code writing an instance of this type into a prepared statement. |
java.lang.String |
castToString(java.lang.String pValue,
java.lang.String pMarshaller)
Returns a piece of Java code converting an instance of this type into a String. |
java.lang.String |
createPreparedStatementColumnName(SchemaAbstractSimpleElement pElement,
int pMode,
java.lang.String pColumnName)
Creates SQL code for preparing a JDBC statement. |
java.lang.String |
createPreparedStatementColumnValue(SchemaAbstractSimpleElement pElement,
int pMode)
Creates SQL code for preparing a JDBC statement. |
int |
createPrepareStatement(SchemaAbstractSimpleElement pElement,
JavaMethod pJm,
int pNum,
int pMode)
Creates Java code for preparing a JDBC statement. |
void |
createSaxEvents(SchemaAbstractSimpleElement pElement,
JavaMethod pJm,
java.lang.String pFieldName,
java.lang.String pMarshaller,
java.lang.String pIndent)
Creates Java code for firing SAX events. |
java.lang.String |
getClone(java.lang.String pValue)
Returns a piece of Java code cloning an instance of this type. |
java.lang.String |
getCompare(java.lang.String p1,
java.lang.String p2)
Returns a piece of Java code that compares the given, non-null values. |
java.lang.String |
getPrimitiveRuntimeType()
Returns the corresponding primitive type of the run-time class, or null. |
java.lang.String |
getQueryType()
Returns the JMManager type for queries. |
java.lang.Class |
getRuntimeType()
Returns the run-time class implementing this type. |
java.lang.String |
getSample(int pCount)
Returns a sample value for the type. |
int[] |
getSQLTypes()
Returns an array of SQL types that are matched by this type or null, if no SQL types apply. |
boolean |
hasPrimitive()
Returns true, if this type has an associated primitive Java type. |
Methods inherited from interface de.ispsoft.jaxme.generator.SchemaType |
getClone, getLocalName, getNamespaceURI, isComplex |
Field Detail |
public static final int OP_INSERT
A possible mode for createPrepareStatement: The value is inserted into the database.
createPrepareStatement(de.ispsoft.jaxme.generator.SchemaAbstractSimpleElement, de.ispsoft.jaxme.generator.javasource.JavaMethod, int, int)
,
Constant Field Valuespublic static final int OP_UPDATE
A possible mode for createPrepareStatement: The value is updated in the database.
createPrepareStatement(de.ispsoft.jaxme.generator.SchemaAbstractSimpleElement, de.ispsoft.jaxme.generator.javasource.JavaMethod, int, int)
,
Constant Field Valuespublic static final int OP_WHERE
A possible mode for createPrepareStatement: The value is used in a where clause.
createPrepareStatement(de.ispsoft.jaxme.generator.SchemaAbstractSimpleElement, de.ispsoft.jaxme.generator.javasource.JavaMethod, int, int)
,
Constant Field ValuesMethod Detail |
public boolean hasPrimitive()
Returns true, if this type has an associated primitive Java type.
public java.lang.String getPrimitiveRuntimeType()
Returns the corresponding primitive type of the run-time class, or null.
public java.lang.Class getRuntimeType()
Returns the run-time class implementing this type.
public java.lang.String castFromString(java.lang.String pValue, java.lang.String pUnmarshaller)
Returns a piece of Java code converting a String into an an instance of this type.
pValue
- The value being converted, typically a
variable name.pUnmarshaller
- A value with an UnmarshallerImpl being used,
typically a variable name.public java.lang.String castToString(java.lang.String pValue, java.lang.String pMarshaller)
Returns a piece of Java code converting an instance of this type into a String.
pValue
- The value being converted, typically a
variable name.pMarshaller
- A value with a MarshallerImpl being used,
typically a variable name.public int[] getSQLTypes()
Returns an array of SQL types that are matched by this type or null, if no SQL types apply.
public java.lang.String castFromResultSet(java.lang.String pResultSet, int num)
Returns a piece of Java code reading an instance of this type from a ResultSet.
public java.lang.String castToPreparedStatement(java.lang.String pStatement, java.lang.String pValue, int num)
Returns a piece of Java code writing an instance of this type into a prepared statement.
public java.lang.String getQueryType()
Returns the JMManager type for queries.
public java.lang.String getClone(java.lang.String pValue)
Returns a piece of Java code cloning an instance of this type.
public java.lang.String getSample(int pCount)
Returns a sample value for the type.
public java.lang.String getCompare(java.lang.String p1, java.lang.String p2)
Returns a piece of Java code that compares the given, non-null values.
public int createPrepareStatement(SchemaAbstractSimpleElement pElement, JavaMethod pJm, int pNum, int pMode)
Creates Java code for preparing a JDBC statement.
pElement
- An atomic element whose value should be added
as a parameter to the prepared statementpJm
- The Java method where to add source.pNum
- The parameter number: 1, 2, ...pMode
- Either of OP_INSERT, OP_UPDATE or OP_WHERE.
public void createSaxEvents(SchemaAbstractSimpleElement pElement, JavaMethod pJm, java.lang.String pFieldName, java.lang.String pMarshaller, java.lang.String pIndent)
Creates Java code for firing SAX events.
pElement
- An atomic element whose value should be
converted into SAX events.pJm
- The Java method where to add source.pFieldName
- The field name to use for reading the valuespMarshaller
- The field name of a Marshaller to usepIndent
- String of blanks for indenting the generated sourcepublic java.lang.String createPreparedStatementColumnName(SchemaAbstractSimpleElement pElement, int pMode, java.lang.String pColumnName)
Creates SQL code for preparing a JDBC statement.
pElement
- An atomic element whose value should be added
as a parameter to the prepared statement.pMode
- Either of OP_INSERT, OP_UPDATE or OP_WHERE.pColumnName
- A suggested column name.
public java.lang.String createPreparedStatementColumnValue(SchemaAbstractSimpleElement pElement, int pMode)
Creates SQL code for preparing a JDBC statement.
pElement
- An atomic element whose value should be added
as a parameter to the prepared statement.pMode
- Either of OP_INSERT, OP_UPDATE or OP_WHERE.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |