|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jrunx.persistence.greylock.BaseDB
|
+--jrunx.persistence.greylock.DBStoreManager
|
+--jrunx.persistence.greylock.InstanceForge
Title: Description: Copyright: Copyright (c) Company:
| Inner Class Summary | |
class |
InstanceForge.DBPropertyNotFoundException
Property not found Type: {typeName} Property: {propName} |
class |
InstanceForge.DeleteRequiredPropertyException
Required property can not be deleted: {colName} Type: {typeName} |
class |
InstanceForge.EmbeddedInstanceNotFoundException
Embedded instance not found: {id} Type: {typeName} Property: {propName} |
static class |
InstanceForge.InvalidPrimaryKeyTypeException
Invalid primary key type Type: {typeName} Column: {colName} Invalid Primary Key Type: {primaryKeyTypeName} |
class |
InstanceForge.InvalidPropertyTypeException
Property expected {expected}, received {actual} Instance ID: {id} Type: {typeName} Property: {propName} |
| Inner classes inherited from class jrunx.persistence.greylock.DBStoreManager |
DBStoreManager.DatasourceMappingException |
| Field Summary | |
static java.lang.String |
DELETE_INSTANCES_BY_TYPE_SQL
|
static java.lang.String |
GET_INSTANCE_ID_SQL
|
static java.lang.String |
GET_INSTANCE_NAME_BY_NAME_SQL
|
static java.lang.String |
GET_INSTANCE_NAME_SQL
|
| Fields inherited from class jrunx.persistence.greylock.DBStoreManager |
_dbmd, _dbMeta, _isInit, _tmd, driverMappingMetaData |
| Fields inherited from interface jrunx.persistence.greylock.Const |
ARRAYED, BIGINT, BIT, BLOB, BYTE, CHAR, DOUBLE, FLOAT, ID, ID_TABLE, INCREMENT, INDEX, INSTANCE, INSTANCE_FORGE_IDS, INSTANCE_ID, INSTANCE_TABLE, INTEGER, INTERNALID, NAME, PARENT, PROPERTY_ID, PROPERTY_TABLE, RELATION_ID, SEARCHABLE, SEQUENCE_PROCEDURE, SHORT, SINK, SOURCE, TIMESTAMP, TYPE_FORGE_IDS, TYPE_ID, TYPE_TABLE, UNDERSCORE, VARCHAR, VIEW |
| Constructor Summary | |
protected |
InstanceForge(DBForgeFactory forgeFactory,
java.sql.Connection con,
java.lang.String typeName,
CFODBMetaData metadata)
|
| Method Summary | |
void |
createInstance(java.util.Map mp,
java.sql.Connection con)
Creates COAPI Objects |
protected void |
createInstance(java.util.Map mp,
DBInvoker invoker,
java.sql.Connection con,
long instanceID)
|
void |
deleteInstance(InstancePK pk,
java.sql.Connection con)
To delete an instance supply either the GUID or the user supplied instance name used to store instance |
protected void |
deleteInstance(java.util.List ids,
DBInvoker dbi,
java.sql.Connection con)
takes a list of internal int instanceID's and deletes them from the specified type. |
protected void |
deleteInstance(java.lang.Long id,
DBInvoker dbi,
java.sql.Connection con)
|
protected java.util.List |
deleteInstanceJoins()
|
static void |
deleteInstances(DBInvoker dbi,
DBTypeDef td)
Delete all instances of a given type. |
protected void |
deleteParentInstances(Name parent,
DBInvoker dbi,
java.sql.Connection con)
|
java.util.Collection |
findAll(java.sql.Connection con)
Returns a list of instance names for the given InstanceForge. |
InstancePK |
findInstanceByPrimaryKey(InstancePK key,
java.sql.Connection con)
Finds the instance in the DB with the supplied Instance Primary Key |
java.util.Collection |
findInstances(Query query,
java.sql.Connection con)
The supplied SQL understood by Greylock that will be executed against the DB. |
java.util.Collection |
findInstances(Query query,
java.lang.Object[] args,
java.sql.Connection con)
The name of the SQL query that will be executed against the DB. |
static java.lang.String |
getID(java.util.Map mp)
Returns the object in a map with a key value of "JRunID" |
protected static java.util.List |
getIDS(java.lang.String column,
java.lang.String typeName,
java.sql.Connection con)
|
java.util.Map |
getInstance(InstancePK arg,
java.sql.Connection con)
Retrieves an instance based on the instance name supplied. |
protected java.util.Map |
getInstance(java.lang.String arg,
java.sql.Connection con)
Returns a map populated with the data for a given named instance |
protected InstanceForge |
getInstanceForge(java.lang.String name,
java.sql.Connection con)
|
protected void |
getInstanceSql(java.lang.String arg,
java.sql.Connection con,
DBInvoker invoker,
java.util.Map col,
java.util.Map mp)
for non-embedded instances |
protected CFODBMetaData |
getMetaData(java.lang.String name,
java.sql.Connection con)
|
java.lang.String |
getTypeName()
|
protected void |
getUpdateSql(java.util.Map mp,
DBInvoker dbi,
java.sql.Connection con,
int instanceID)
|
static java.lang.String |
setParameters(java.lang.String sql,
java.lang.Object[] args)
|
void |
updateInstance(java.util.Map mp,
java.sql.Connection con)
Put only the props to be updated in the map - update statements will be constructed to only include the props that exist in the map. |
| Methods inherited from class jrunx.persistence.greylock.DBStoreManager |
getDatabaseMetaData, getDBInvoker, getDBSchema, getDBStoreMetaData, getDBVendor, getPackageDelimiter, getTypeMappingMetaData, init, initClassMappings, quoteIdentifier, setDBStoreMetaData, useQuotedIdentifiers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String GET_INSTANCE_ID_SQL
public static final java.lang.String GET_INSTANCE_NAME_SQL
public static final java.lang.String GET_INSTANCE_NAME_BY_NAME_SQL
public static final java.lang.String DELETE_INSTANCES_BY_TYPE_SQL
| Constructor Detail |
protected InstanceForge(DBForgeFactory forgeFactory,
java.sql.Connection con,
java.lang.String typeName,
CFODBMetaData metadata)
throws java.lang.Exception,
NoSuchTypeException
| Method Detail |
protected InstanceForge getInstanceForge(java.lang.String name,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchTypeException
protected CFODBMetaData getMetaData(java.lang.String name,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchTypeException
public java.lang.String getTypeName()
public void createInstance(java.util.Map mp,
java.sql.Connection con)
throws java.lang.Exception
createInstance in interface ObjectPersistencemp - This map is expected to match the graph of the Typecon - InstanceForge.InvalidPropertyTypeException -
protected void createInstance(java.util.Map mp,
DBInvoker invoker,
java.sql.Connection con,
long instanceID)
throws java.lang.Exception
public java.util.Collection findAll(java.sql.Connection con)
throws java.lang.Exception
findAll in interface ObjectPersistencecon - InstanceForge.InvalidPropertyTypeException -
public InstancePK findInstanceByPrimaryKey(InstancePK key,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchInstanceException
findInstanceByPrimaryKey in interface ObjectPersistencekey - InstancePKcon - java.sql.ConnectionInstanceForge.InvalidPropertyTypeException -
public java.util.Map getInstance(InstancePK arg,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchInstanceException
ObjectPersistencegetInstance in interface ObjectPersistencejrunx.persistence.greylock.ObjectPersistencename - java.lang.Stringcon - java.sql.Connectionjava.lang.Exception - NoSuchInstanceException -
protected java.util.Map getInstance(java.lang.String arg,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchInstanceException
instanceName - con - InstanceForge.InvalidPropertyTypeException - NoSuchInstanceException -
protected void getInstanceSql(java.lang.String arg,
java.sql.Connection con,
DBInvoker invoker,
java.util.Map col,
java.util.Map mp)
throws java.lang.Exception
arg - con - invoker - col - mp -
public void updateInstance(java.util.Map mp,
java.sql.Connection con)
throws java.lang.Exception
ObjectPersistenceupdateInstance in interface ObjectPersistencejrunx.persistence.greylock.ObjectPersistenceprops - java.util.Mapcon - java.sql.Connectionjava.lang.Exception - NoSuchInstanceException -
protected void getUpdateSql(java.util.Map mp,
DBInvoker dbi,
java.sql.Connection con,
int instanceID)
throws java.lang.Exception
public java.util.Collection findInstances(Query query,
java.sql.Connection con)
throws java.lang.Exception
sql - java.lang.String SQLcon - java.sql.ConnectionInstanceForge.InvalidPropertyTypeException -
public java.util.Collection findInstances(Query query,
java.lang.Object[] args,
java.sql.Connection con)
throws java.lang.Exception
findInstances in interface ObjectPersistencequery - Queryargs - java.lang.Object[] Arguments passed to the querycon - java.sql.ConnectionInstanceForge.InvalidPropertyTypeException -
public static java.lang.String setParameters(java.lang.String sql,
java.lang.Object[] args)
throws java.lang.Exception
public static void deleteInstances(DBInvoker dbi,
DBTypeDef td)
throws java.lang.Exception
dbi - td - InstanceForge.InvalidPropertyTypeException -
public void deleteInstance(InstancePK pk,
java.sql.Connection con)
throws java.lang.Exception,
NoSuchInstanceException
ObjectPersistencedeleteInstance in interface ObjectPersistencejrunx.persistence.greylock.ObjectPersistencename - InstancePK instance primary keycon - java.sql.Connectionjava.lang.Exception - NoSuchInstanceException -
protected void deleteInstance(java.lang.Long id,
DBInvoker dbi,
java.sql.Connection con)
throws java.lang.Exception
protected void deleteInstance(java.util.List ids,
DBInvoker dbi,
java.sql.Connection con)
throws java.lang.Exception
ids - java.util.List of instanceID's to be deleteddbi - DBInvoker to cache db callscon - Connection objectInstanceForge.InvalidPropertyTypeException -
protected java.util.List deleteInstanceJoins()
throws java.lang.Exception
protected static java.util.List getIDS(java.lang.String column,
java.lang.String typeName,
java.sql.Connection con)
throws java.lang.Exception
protected void deleteParentInstances(Name parent,
DBInvoker dbi,
java.sql.Connection con)
throws java.lang.Exception
public static java.lang.String getID(java.util.Map mp)
mp - the map that contains an id key
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||