org.makumba.db.hibernate
Class HibernateCRUDOperationProvider
java.lang.Object
org.makumba.providers.CRUDOperationProvider
org.makumba.db.hibernate.HibernateCRUDOperationProvider
public class HibernateCRUDOperationProvider
- extends CRUDOperationProvider
Hibernate-specific implementation of a CRUDOperationProvider
FIXME there are probably more bugs with the
collections of non-generated mappings
- Version:
- $Id: HibernateCRUDOperationProvider.java,v 1.1 02.11.2007 14:05:40 Manuel Exp $
- Author:
- Manuel Gay
Method Summary |
void |
checkInsert(Transaction t,
String type,
Dictionary<String,Object> fieldsToCheck,
Dictionary<String,DataHolder> fieldsToIgnore,
Dictionary<String,Object> allFields)
Checks if a set of values can be updated in the database |
void |
checkUpdate(Transaction t,
String type,
Pointer pointer,
Dictionary<String,Object> fieldsToCheck,
Dictionary<String,DataHolder> fieldsToIgnore,
Dictionary<String,Object> allFields)
Checks if a set of values can be updated in the database. |
void |
deleteSet(Transaction t,
Pointer base,
FieldDefinition fi)
Deletes a set |
Pointer |
insert(Transaction t,
String type,
Dictionary<String,Object> data)
Inserts data of a given type |
static boolean |
isGenerated(Class<?> clazz)
Figures whether a class was generated by Makumba |
static boolean |
isInteger(String name)
|
static boolean |
isLong(String name)
|
int |
update1(Transaction t,
Pointer p,
DataDefinition dd,
Dictionary<String,Object> dic)
|
void |
updateSet1(Transaction t,
Pointer base,
FieldDefinition fi,
Object val)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateCRUDOperationProvider
public HibernateCRUDOperationProvider()
checkInsert
public void checkInsert(Transaction t,
String type,
Dictionary<String,Object> fieldsToCheck,
Dictionary<String,DataHolder> fieldsToIgnore,
Dictionary<String,Object> allFields)
- Description copied from class:
CRUDOperationProvider
- Checks if a set of values can be updated in the database
- Specified by:
checkInsert
in class CRUDOperationProvider
- Parameters:
t
- the Transaction to be usedtype
- the type of the base object to insert tofieldsToCheck
- the values to be checkedfieldsToIgnore
- the values of toCheck not to be checkedallFields
- the entire data to be inserted
checkUpdate
public void checkUpdate(Transaction t,
String type,
Pointer pointer,
Dictionary<String,Object> fieldsToCheck,
Dictionary<String,DataHolder> fieldsToIgnore,
Dictionary<String,Object> allFields)
- Description copied from class:
CRUDOperationProvider
- Checks if a set of values can be updated in the database.
- Specified by:
checkUpdate
in class CRUDOperationProvider
- Parameters:
t
- the Transaction to be usedtype
- the type of the base object to insert topointer
- the pointer to the record to be updatedfieldsToCheck
- the values to be checkedfieldsToIgnore
- the values of toCheck not to be checkedallFields
- the entire data to be inserted
insert
public Pointer insert(Transaction t,
String type,
Dictionary<String,Object> data)
- Description copied from class:
CRUDOperationProvider
- Inserts data of a given type
- Specified by:
insert
in class CRUDOperationProvider
- Parameters:
t
- the Transaction handling the insertiontype
- the type of the object to be inserteddata
- the data to be inserted
- Returns:
- a Pointer corresponding to the place where the record has been inserted
updateSet1
public void updateSet1(Transaction t,
Pointer base,
FieldDefinition fi,
Object val)
- Overrides:
updateSet1
in class CRUDOperationProvider
deleteSet
public void deleteSet(Transaction t,
Pointer base,
FieldDefinition fi)
- Description copied from class:
CRUDOperationProvider
- Deletes a set
- Overrides:
deleteSet
in class CRUDOperationProvider
- Parameters:
t
- the Transaction handling the deletionbase
- the base pointer to the object to be deletedfi
- the FieldDefinition of the field containing the set
update1
public int update1(Transaction t,
Pointer p,
DataDefinition dd,
Dictionary<String,Object> dic)
- Specified by:
update1
in class CRUDOperationProvider
isGenerated
public static boolean isGenerated(Class<?> clazz)
- Figures whether a class was generated by Makumba
- Parameters:
clazz
- the class
- Returns:
true
if it was generated, false
otherwise
isInteger
public static boolean isInteger(String name)
isLong
public static boolean isLong(String name)