|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.codegen.java.generator.ast.CRUDOracleReference
public final class CRUDOracleReference
This class is the reference implementation or template for the implementation of CRUD (Create, Read, Update, Delete) for an Oracle database. This class is not intended for productive use because of poor architecture. This class should show how a reference implementation can be done.
| Constructor Summary | |
|---|---|
CRUDOracleReference()
This default constructor is needed by the extension registry to create an instance. |
|
CRUDOracleReference(IGeneratedJavaClass2 dbt)
Constructor initializes the model |
|
| Method Summary | |
|---|---|
int |
delete()
Remove the record from the database indicated by the key values of this object. |
java.util.List<java.lang.Class<?>> |
getImports2Add()
Get the list of the classes that are needed for this reference implementation Each list entry is unique. |
java.lang.String |
getPassWd()
Retrieve the password for the user to connect to the database The access is public since this method is accessed by reflection. |
java.lang.String |
getTableName()
Retrieve the table name from the model. |
java.lang.String |
getURL()
Retrieve the URL string from the model. |
void |
initModel(IGeneratedJavaClass2 model)
Initialize the model |
java.lang.String |
insertPK()
Generate the where clause based on the primary key of the model table incl. where keyword. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CRUDOracleReference()
public CRUDOracleReference(IGeneratedJavaClass2 dbt)
dbt - DataBaseTable| Method Detail |
|---|
public void initModel(IGeneratedJavaClass2 model)
initModel in interface IReferenceImplementationmodel - of a generatable java class
@AReferenceImplementation
@AReplaceMethods(methodNames={"getTableName","insertPK"})
public int delete()
throws java.sql.SQLException,
java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.ClassNotFoundException@AValueProvider public java.lang.String getTableName()
@AValueProvider public java.lang.String insertPK()
@AValueProvider public java.lang.String getURL()
@AValueProvider public java.lang.String getPassWd()
public java.util.List<java.lang.Class<?>> getImports2Add()
getImports2Add in interface IReferenceImplementation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||