public class CompositeId extends Id
Modifier | Constructor and Description |
---|---|
protected |
CompositeId(EntityType ownerType) |
|
CompositeId(EntityType ownerType,
java.util.ArrayList<IdField> keys) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateCastFromObject(java.lang.String value)
Generates code to convert to the type from the object.
|
void |
generateCheckCreateKey(JavaWriter out)
Generates the set clause.
|
java.lang.String |
generateCreateTableSQL(AmberPersistenceUnit manager)
Generates the where clause.
|
java.lang.String |
generateEquals(java.lang.String leftBase,
java.lang.String value)
Generates code to test the equals.
|
java.lang.String |
generateGet(java.lang.String value)
Returns the key for the value
|
java.lang.String |
generateGetProxyProperty(java.lang.String value)
Returns the key for the value
|
java.lang.String |
generateJavaSelect(java.lang.String id)
Generates the JPA QL select clause.
|
int |
generateLoadForeign(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Returns the foreign type.
|
int |
generateLoadForeign(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index,
java.lang.String name)
Returns the foreign type.
|
void |
generateLoadFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
java.lang.String |
generateLoadSelect(java.lang.String id)
Generates the select clause.
|
void |
generateMatch(JavaWriter out,
java.lang.String key)
Generates code for a match.
|
void |
generatePrologue(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
void |
generatePrologue(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet,
java.lang.String name)
Generates any prologue.
|
void |
generatePrologueLoad(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
void |
generatePrologueMake(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
java.lang.String |
generateSelect(java.lang.String id)
Generates the select clause.
|
void |
generateSet(JavaWriter out,
java.lang.String objThis,
java.lang.String value)
Generates loading cache
|
void |
generateSetKey(JavaWriter out,
java.lang.String pstmt,
java.lang.String obj,
java.lang.String index)
Generates the set clause.
|
void |
generateUpdateFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
java.lang.String |
generateWhere(java.lang.String id)
Generates the where clause.
|
java.lang.String |
getForeignMakeKeyName()
Returns the foreign type.
|
java.lang.String |
getForeignTypeName()
Returns the foreign type.
|
void |
setKeyClass(java.lang.Class keyClass)
Sets the foreign key type.
|
java.lang.String |
toObject(java.lang.String value)
Generates code to convert to the object.
|
addKey, generateCopy, generateGetProxyKey, generateMatchArgWhere, generateRawWhere, generateSet, generateSetGeneratedKeys, generateSetInsert, generateStatementSet, getColumns, getEmbeddedIdField, getGeneratedIdField, getKey, getKeyCount, getKeys, getObject, getOwnerType, init, isEmbeddedId, isIdentityGenerator, toObjectKey
public CompositeId(EntityType ownerType, java.util.ArrayList<IdField> keys)
protected CompositeId(EntityType ownerType)
public void setKeyClass(java.lang.Class keyClass)
public java.lang.String getForeignTypeName()
getForeignTypeName
in class Id
public java.lang.String getForeignMakeKeyName()
public void generatePrologue(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet) throws java.io.IOException
generatePrologue
in class Id
java.io.IOException
public void generatePrologue(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet, java.lang.String name) throws java.io.IOException
generatePrologue
in class Id
java.io.IOException
public void generatePrologueMake(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet) throws java.io.IOException
java.io.IOException
public void generatePrologueLoad(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet) throws java.io.IOException
java.io.IOException
public int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index) throws java.io.IOException
generateLoadForeign
in class Id
java.io.IOException
public int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index, java.lang.String name) throws java.io.IOException
generateLoadForeign
in class Id
java.io.IOException
public java.lang.String generateSelect(java.lang.String id)
generateSelect
in class Id
public java.lang.String generateJavaSelect(java.lang.String id)
generateJavaSelect
in class Id
public java.lang.String generateLoadSelect(java.lang.String id)
generateLoadSelect
in class Id
public java.lang.String generateGet(java.lang.String value)
generateGet
in class Id
public void generateSet(JavaWriter out, java.lang.String objThis, java.lang.String value) throws java.io.IOException
generateSet
in class Id
java.io.IOException
public java.lang.String generateGetProxyProperty(java.lang.String value)
public void generateLoadFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
generateLoadFromObject
in class Id
java.io.IOException
public void generateUpdateFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
generateUpdateFromObject
in class Id
java.io.IOException
public java.lang.String generateWhere(java.lang.String id)
public java.lang.String generateCreateTableSQL(AmberPersistenceUnit manager)
generateCreateTableSQL
in class Id
public void generateSetKey(JavaWriter out, java.lang.String pstmt, java.lang.String obj, java.lang.String index) throws java.io.IOException
generateSetKey
in class Id
java.io.IOException
public java.lang.String generateCastFromObject(java.lang.String value)
generateCastFromObject
in class Id
public void generateMatch(JavaWriter out, java.lang.String key) throws java.io.IOException
generateMatch
in class Id
java.io.IOException
public java.lang.String generateEquals(java.lang.String leftBase, java.lang.String value)
generateEquals
in class Id
public void generateCheckCreateKey(JavaWriter out) throws java.io.IOException
generateCheckCreateKey
in class Id
java.io.IOException