Package com.jalios.jcms.db
Class DBDataRevisionManager
- java.lang.Object
-
- com.jalios.jcms.db.DBDataRevisionManager
-
public class DBDataRevisionManager extends java.lang.Object
This class manages revision for HistorizedDBData- Since:
- jcms-6.2.0
- Author:
- Olivier Dedieu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REV_DATA_ID_FIELD
static java.lang.String
REV_DATE_FIELD
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DBDataRevision
addRevision(DBData data, int op, Member mbr)
Add a new revision for the given data.static DBDataRevisionManager
getInstance()
java.lang.Class
getRevisionClass(java.lang.Class clazz)
Returns the revision class bound to the given class.java.util.List<Data>
getRevisionDataList(Data data)
Returns a list of data representation of each revision of the given data.java.util.List<Data>
getRevisionDataList(java.lang.Class clazz, java.lang.String id)
Returns a list of data representation of each revision of the given data.java.util.List<Data>
getRevisionDataList(java.lang.String id)
Returns a list of data representation of each revision of the given data.java.util.List<DBDataRevision>
getRevisionList(Data data)
Returns the list of DBDataRevision for the given data.java.util.List<DBDataRevision>
getRevisionList(java.lang.Class clazz, java.lang.String id)
Returns the list of DBDataRevision for the given data.
-
-
-
Field Detail
-
REV_DATA_ID_FIELD
public static final java.lang.String REV_DATA_ID_FIELD
- See Also:
- Constant Field Values
-
REV_DATE_FIELD
public static final java.lang.String REV_DATE_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static DBDataRevisionManager getInstance()
-
getRevisionList
public java.util.List<DBDataRevision> getRevisionList(Data data)
Returns the list of DBDataRevision for the given data.- Parameters:
data
- the data- Returns:
- the list of DBDataRevision for the given data.
- Since:
- jcms-6.2.0
-
getRevisionList
public java.util.List<DBDataRevision> getRevisionList(java.lang.Class clazz, java.lang.String id)
Returns the list of DBDataRevision for the given data.- Parameters:
clazz
- the class of the Dataid
- the id of the data- Returns:
- the list of DBDataRevision for the given data.
- Since:
- jcms-6.2.0
-
getRevisionClass
public java.lang.Class getRevisionClass(java.lang.Class clazz)
Returns the revision class bound to the given class.- Parameters:
clazz
- the class- Returns:
- the revision class bound to the given class.
- Since:
- jcms-6.2.0
-
getRevisionDataList
public java.util.List<Data> getRevisionDataList(Data data)
Returns a list of data representation of each revision of the given data.- Parameters:
data
- the data- Returns:
- a list of data representation of each revision of the given data.
- Since:
- jcms-6.2.0
-
getRevisionDataList
public java.util.List<Data> getRevisionDataList(java.lang.String id)
Returns a list of data representation of each revision of the given data.- Parameters:
id
- the id of the data- Returns:
- a list of data representation of each revision of the given data.
- Since:
- jcms-6.2.0
-
getRevisionDataList
public java.util.List<Data> getRevisionDataList(java.lang.Class clazz, java.lang.String id)
Returns a list of data representation of each revision of the given data.- Parameters:
clazz
- the class of the dataid
- the id of the data- Returns:
- a list of data representation of each revision of the given data.
- Since:
- jcms-6.2.0
-
addRevision
public DBDataRevision addRevision(DBData data, int op, Member mbr)
Add a new revision for the given data.- Parameters:
data
- the dataop
- the operation (OP_CREATE, OP_UPDATE or OP_DELETE)mbr
- the author of the revision- Returns:
- the new DBDataRevision
- Since:
- jcms-6.2.0
-
-