Persistencepublic final class SQLEngine extends java.lang.Object implements Persistence
| Constructor | Description | 
|---|---|
SQLEngine(ClassDescriptor clsDesc,
         PersistenceFactory factory) | 
| Modifier and Type | Method | Description | 
|---|---|---|
Identity | 
create(Database database,
      java.lang.Object conn,
      ProposedEntity entity,
      Identity identity) | 
 Creates a new object in persistence storage. 
 | 
PersistenceQuery | 
createCall(java.lang.String spCall,
          java.lang.Class[] types) | 
|
PersistenceQuery | 
createQuery(QueryExpression query,
           java.lang.Class[] types,
           AccessMode accessMode) | 
 Creates and returns a new query object. 
 | 
SQLRelationLoader | 
createSQLRelationLoader(java.lang.String manyTable,
                       java.lang.String[] idSQL,
                       int[] idType,
                       TypeConvertor[] idTo,
                       TypeConvertor[] idFrom,
                       java.lang.String[] relatedIdSQL,
                       int[] relatedIdType,
                       TypeConvertor[] ridTo,
                       TypeConvertor[] ridFrom) | 
|
void | 
delete(java.lang.Object conn,
      Identity identity) | 
 Deletes the object from persistent storage, given the object'
 identity. 
 | 
SQLColumnInfo[] | 
getColumnInfoForIdentities() | 
|
ClassDescriptor | 
getDescriptor() | 
 Used by  
OQLQuery to retrieve the class descriptor. | 
SQLEngine | 
getExtends() | 
|
QueryExpression | 
getFinder() | 
|
SQLFieldInfo[] | 
getInfo() | 
|
QueryExpression | 
getQueryExpression() | 
|
TableInfo | 
getTableInfo() | 
|
protected java.lang.Object | 
idToJava(int index,
        java.lang.Object object) | 
|
void | 
load(java.lang.Object conn,
    ProposedEntity entity,
    Identity identity,
    AccessMode accessMode) | 
 Loads the object from persistence storage. 
 | 
void | 
setExtends(SQLEngine engine) | 
 Mutator method for setting extends SQLEngine. 
 | 
void | 
store(java.lang.Object conn,
     Identity identity,
     ProposedEntity newentity,
     ProposedEntity oldentity) | 
 Stores the object in persistent storage, given the object fields
 and its identity. 
 | 
protected java.lang.Object | 
toJava(int field,
      int column,
      java.lang.Object object) | 
|
java.lang.String | 
toString() | 
public SQLEngine(ClassDescriptor clsDesc, PersistenceFactory factory) throws MappingException
MappingExceptionpublic SQLRelationLoader createSQLRelationLoader(java.lang.String manyTable, java.lang.String[] idSQL, int[] idType, TypeConvertor[] idTo, TypeConvertor[] idFrom, java.lang.String[] relatedIdSQL, int[] relatedIdType, TypeConvertor[] ridTo, TypeConvertor[] ridFrom)
createSQLRelationLoader in interface Persistencepublic SQLColumnInfo[] getColumnInfoForIdentities()
public SQLFieldInfo[] getInfo()
public void setExtends(SQLEngine engine)
engine - public SQLEngine getExtends()
public ClassDescriptor getDescriptor()
OQLQuery to retrieve the class descriptor.public PersistenceQuery createQuery(QueryExpression query, java.lang.Class[] types, AccessMode accessMode) throws QueryException
PersistencecreateQuery in interface Persistencequery - The query expressiontypes - List of all parameter types, or nullQueryException - The query is invalidpublic PersistenceQuery createCall(java.lang.String spCall, java.lang.Class[] types)
public QueryExpression getQueryExpression()
public QueryExpression getFinder()
public TableInfo getTableInfo()
protected java.lang.Object idToJava(int index,
                                    java.lang.Object object)
protected java.lang.Object toJava(int field,
                                  int column,
                                  java.lang.Object object)
public Identity create(Database database, java.lang.Object conn, ProposedEntity entity, Identity identity) throws PersistenceException
Persistencecreate in interface Persistenceconn - An open connectionentity - The fields to storeidentity - The object's identityPersistenceException - An object with the same identity already
         exists in persistent storage or any other persistence error
         occured.public void store(java.lang.Object conn,
                  Identity identity,
                  ProposedEntity newentity,
                  ProposedEntity oldentity)
           throws PersistenceException
PersistencePersistence.create(org.exolab.castor.jdo.Database, java.lang.Object, org.castor.persist.ProposedEntity, org.exolab.castor.persist.spi.Identity). This method should
 detect whether the object has been modified in persistent storage
 since it was loaded. After this method returns all locks on the
 object must be retained until the transaction has completed.
 This method may return a new stamp to track further updates to
 the object.
 
 If the object was not retrieved for exclusive access, this
 method will be asked to perform dirty checking prior to storing
 the object. The original argument will contains the
 object's original fields as retrieved in the transaction, and
 stamp the object's stamp returned from a successful
 call to Persistence.load(java.lang.Object, org.castor.persist.ProposedEntity, org.exolab.castor.persist.spi.Identity, org.exolab.castor.mapping.AccessMode). These arguments are null for objects
 retrieved with an exclusive lock.
store in interface Persistenceconn - An open connectionidentity - The object's identitynewentity - The fields to storeoldentity - The original fields, or nullPersistenceException - The object has been modified in
         persistence storage since it was last loaded or has been
         deleted from persitence storage or any other persistence
         error occored.public void delete(java.lang.Object conn,
                   Identity identity)
            throws PersistenceException
PersistencePersistence.create(org.exolab.castor.jdo.Database, java.lang.Object, org.castor.persist.ProposedEntity, org.exolab.castor.persist.spi.Identity). After this method returns all
 locks on the object must be retained until the transaction has
 completed.delete in interface Persistenceconn - An open connectionidentity - The object's identityPersistenceException - A persistence error occuredpublic void load(java.lang.Object conn,
                 ProposedEntity entity,
                 Identity identity,
                 AccessMode accessMode)
          throws PersistenceException
store(java.lang.Object, org.exolab.castor.persist.spi.Identity, org.castor.persist.ProposedEntity, org.castor.persist.ProposedEntity)). If lock is true the object must be
 locked in persistence storage to prevent concurrent updates.load in interface Persistenceconn - An open connectionentity - An Object[] to load field values intoidentity - Identity of the object to load.accessMode - The access mode (null equals shared)PersistenceException - A persistence error occuredpublic java.lang.String toString()
toString in class java.lang.ObjectIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com