com.jalios.jcms.db
Class DBDataRevisionManager

java.lang.Object
  extended by com.jalios.jcms.db.DBDataRevisionManager

public class DBDataRevisionManager
extends Object

This class manages revision for HistorizedDBData

Since:
jcms-6.2.0
Version:
$Revision: 25885 $
Author:
Olivier Dedieu

Field Summary
static String REV_DATA_ID_FIELD
           
static String REV_DATE_FIELD
           
static String REVISION
           
 
Method Summary
 DBDataRevision addRevision(DBData data, int op, Member mbr)
          Add a new revision for the given data.
static DBDataRevisionManager getInstance()
           
 Class getRevisionClass(Class clazz)
          Returns the revision class bound to the given class.
 List<Data> getRevisionDataList(Class clazz, String id)
          Returns a list of data representation of each revision of the given data.
 List<Data> getRevisionDataList(Data data)
          Returns a list of data representation of each revision of the given data.
 List<Data> getRevisionDataList(String id)
          Returns a list of data representation of each revision of the given data.
 List<DBDataRevision> getRevisionList(Class clazz, String id)
          Returns the list of DBDataRevision for the given data.
 List<DBDataRevision> getRevisionList(Data data)
          Returns the list of DBDataRevision for the given data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

REV_DATA_ID_FIELD

public static final String REV_DATA_ID_FIELD
See Also:
Constant Field Values

REV_DATE_FIELD

public static final String REV_DATE_FIELD
See Also:
Constant Field Values
Method Detail

getInstance

public static DBDataRevisionManager getInstance()

getRevisionList

public 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 List<DBDataRevision> getRevisionList(Class clazz,
                                            String id)
Returns the list of DBDataRevision for the given data.

Parameters:
clazz - the class of the Data
id - the id of the data
Returns:
the list of DBDataRevision for the given data.
Since:
jcms-6.2.0

getRevisionClass

public Class getRevisionClass(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 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 List<Data> getRevisionDataList(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 List<Data> getRevisionDataList(Class clazz,
                                      String id)
Returns a list of data representation of each revision of the given data.

Parameters:
clazz - the class of the data
id - 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 data
op - the operation (OP_CREATE, OP_UPDATE or OP_DELETE)
mbr - the author of the revision
Returns:
the new DBDataRevision
Since:
jcms-6.2.0


Copyright © 2001-2010 Jalios SA. All Rights Reserved.