com.caucho.amber.field
Class EmbeddedId

java.lang.Object
  extended by com.caucho.amber.field.Id
      extended by com.caucho.amber.field.CompositeId
          extended by com.caucho.amber.field.EmbeddedId

public class EmbeddedId
extends CompositeId

Configuration for a bean's field


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
EmbeddedId(EntityType ownerType, EmbeddedIdField key)
           
 
Method Summary
 void generateCopy(JavaWriter out, java.lang.String dest, java.lang.String source)
          Generates code to copy to an object.
 java.lang.String generateGet(java.lang.String objThis)
          Returns the key for the value
 int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index, java.lang.String name)
          Returns the foreign type.
 void generatePrologue(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet)
          Generates any class prologue.
 void generatePrologueMake(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet)
          Generates any prologue.
 EmbeddedIdField getEmbeddedIdField()
          Returns the embedded id field
 boolean isEmbeddedId()
          Returns true if this is an @EmbeddedId
 boolean isIdentityGenerator()
          Returns true for an identity key.
 
Methods inherited from class com.caucho.amber.field.CompositeId
generateCastFromObject, generateCheckCreateKey, generateCreateTableSQL, generateEquals, generateGetProxyProperty, generateJavaSelect, generateLoadForeign, generateLoadFromObject, generateLoadSelect, generateMatch, generatePrologue, generatePrologueLoad, generateSelect, generateSet, generateSetKey, generateUpdateFromObject, generateWhere, getForeignMakeKeyName, getForeignTypeName, setKeyClass, toObject
 
Methods inherited from class com.caucho.amber.field.Id
addKey, generateGetProxyKey, generateMatchArgWhere, generateRawWhere, generateSet, generateSetGeneratedKeys, generateSetInsert, generateStatementSet, getColumns, getGeneratedIdField, getKey, getKeyCount, getKeys, getObject, getOwnerType, init, toObjectKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

EmbeddedId

public EmbeddedId(EntityType ownerType,
                  EmbeddedIdField key)
Method Detail

isIdentityGenerator

public boolean isIdentityGenerator()
Returns true for an identity key.

Overrides:
isIdentityGenerator in class Id

getEmbeddedIdField

public EmbeddedIdField getEmbeddedIdField()
Returns the embedded id field

Overrides:
getEmbeddedIdField in class Id

isEmbeddedId

public boolean isEmbeddedId()
Returns true if this is an @EmbeddedId

Overrides:
isEmbeddedId in class Id

generateCopy

public void generateCopy(JavaWriter out,
                         java.lang.String dest,
                         java.lang.String source)
                  throws java.io.IOException
Generates code to copy to an object.

Overrides:
generateCopy in class Id
Throws:
java.io.IOException

generateLoadForeign

public int generateLoadForeign(JavaWriter out,
                               java.lang.String rs,
                               java.lang.String indexVar,
                               int index,
                               java.lang.String name)
                        throws java.io.IOException
Returns the foreign type.

Overrides:
generateLoadForeign in class CompositeId
Throws:
java.io.IOException

generatePrologue

public void generatePrologue(JavaWriter out,
                             java.util.HashSet<java.lang.Object> completedSet)
                      throws java.io.IOException
Generates any class prologue.

Overrides:
generatePrologue in class CompositeId
Throws:
java.io.IOException

generatePrologueMake

public void generatePrologueMake(JavaWriter out,
                                 java.util.HashSet<java.lang.Object> completedSet)
                          throws java.io.IOException
Generates any prologue.

Overrides:
generatePrologueMake in class CompositeId
Throws:
java.io.IOException

generateGet

public java.lang.String generateGet(java.lang.String objThis)
Returns the key for the value

Overrides:
generateGet in class CompositeId