|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kea.busfw.BusFactory
the BusinessFactory create or get a BusEntity Object.
Field Summary | |
protected java.util.Hashtable |
entityPools
the pool cache entity |
protected static BusFactory |
instance
a instance of BusinessFactory |
protected java.lang.String |
JDBC_DRIVER
jdbc driver |
Constructor Summary | |
protected |
BusFactory()
declared the construction method is private |
Method Summary | |
BusEntity |
create(java.lang.String entityName)
create an entity and create the entity id |
BusEntity |
generateBusEntity(java.lang.String entityName,
java.lang.String id)
generate business entity object from database |
java.util.List |
getEntitiyByCriteria(java.lang.String entityName,
java.lang.String criteria)
get business entities list |
BusEntity |
getEntity(java.lang.String entityName,
java.lang.String id)
get a Business Entity Object |
protected java.util.Map |
getEntityPool(java.lang.String entityName)
get entity pool |
static BusFactory |
getInstance()
get a BusinessFactory instance the method through which this class is accessed |
protected java.lang.Object |
getValue(java.sql.ResultSet rs,
java.lang.String columnName,
int dataType)
get a column value from ResultSet of jdbc |
protected BusEntity |
newBusEntity(java.lang.String entityName,
java.sql.ResultSet rs)
create new entity and fill it with ResultSet |
boolean |
update(BusEntity entity)
update the Entity |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.Hashtable entityPools
protected static BusFactory instance
protected final java.lang.String JDBC_DRIVER
Constructor Detail |
protected BusFactory()
Method Detail |
public static BusFactory getInstance()
public BusEntity getEntity(java.lang.String entityName, java.lang.String id)
entityName
- a entity nameentityid
- a entity idpublic java.util.List getEntitiyByCriteria(java.lang.String entityName, java.lang.String criteria)
entityName
- a entity namecriteria
- a query criteriapublic BusEntity generateBusEntity(java.lang.String entityName, java.lang.String id)
entityName
- a entity namecriteria
- a condition Stringprotected BusEntity newBusEntity(java.lang.String entityName, java.sql.ResultSet rs)
rs
- a jdbc ResultSetprotected java.lang.Object getValue(java.sql.ResultSet rs, java.lang.String columnName, int dataType)
columnName
- a column namedataType
- a column data typeprotected java.util.Map getEntityPool(java.lang.String entityName)
entityName
- a entity namepublic BusEntity create(java.lang.String entityName)
entityName
- a entity namepublic boolean update(BusEntity entity)
entity
- a entity Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |