|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.directory.sdk.sync.types.DatabaseChangeRecord.Builder
public static class DatabaseChangeRecord.Builder
This class is used to construct DatabaseChangeRecord instances. At least a
DatabaseChangeRecord.ChangeType
and an identifiableInfo string are required; the rest of
the parameters are optional.
Arbitrary properties can also be added to the object by calling
addProperty(Object, Object)
. The setter methods return the Builder
instance itself, so that these calls can be chained. When finished setting
up parameters, call the build()
method to create a new
DatabaseChangeRecord
.
Constructor Summary | |
---|---|
DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type,
com.unboundid.ldap.sdk.DN identifiableInfo)
Creates a Builder which can be used to construct a DatabaseChangeRecord. |
|
DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type,
java.lang.String identifiableInfo)
Creates a Builder which can be used to construct a DatabaseChangeRecord. |
|
DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type,
java.lang.String identifiableInfo,
java.lang.String delimiter)
Creates a Builder which can be used to construct a DatabaseChangeRecord. |
Method Summary | |
---|---|
DatabaseChangeRecord.Builder |
addProperty(java.lang.Object key,
java.lang.Object value)
Add an arbitrary attachment or property to the DatabaseChangeRecord being built. |
DatabaseChangeRecord |
build()
Construct the DatabaseChangeRecord. |
DatabaseChangeRecord.Builder |
changedColumns(java.lang.String[] changedColumns)
Set the set of changed columns for this change entry. |
DatabaseChangeRecord.Builder |
changeNumber(long changeNumber)
Set the change number that identifies this particular change (if applicable). |
DatabaseChangeRecord.Builder |
changeTime(long changeTime)
Set the time at which the change occurred. |
DatabaseChangeRecord.Builder |
entryType(java.lang.String entryType)
Set the database entry type that this change corresponds to (for example "account" or "subscriber"). |
DatabaseChangeRecord.Builder |
modifier(java.lang.String modifier)
Set the database user that made the change. |
DatabaseChangeRecord.Builder |
tableName(java.lang.String tableName)
Set the database table on which the change occurred. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type, com.unboundid.ldap.sdk.DN identifiableInfo)
type
- the ChangeType (insert/update/delete/resync)identifiableInfo
- a unique identifier for the row that changed
(i.e. "account_id=123"). If multiple attributes are part of
the identifier, they should be separate RDN components of the DN
(i.e. "account_id=123,group_id=5"). The order of the RDN
components does not matter here.public DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type, java.lang.String identifiableInfo)
type
- the ChangeType (insert/update/delete/resync)identifiableInfo
- a unique identifier for the row that changed
(i.e. "account_id=123"). If multiple attributes are part of
the identifier, they should be delimited with the default
delimiter of "%%" (i.e. "account_id=123%%group_id=5").
The order of the components does not matter here.public DatabaseChangeRecord.Builder(DatabaseChangeRecord.ChangeType type, java.lang.String identifiableInfo, java.lang.String delimiter)
type
- the ChangeType (insert/update/delete/resync)identifiableInfo
- a unique identifier for the row that changed
(i.e. "account_id=123"). If multiple attributes are part of
the identifier, they should be delimited with a unique string
(i.e. "account_id=123%%group_id=5") which is specified by the
delimiter parameter. The order of the components does
not matter here.delimiter
- The delimiter used to split separate components of the
identifiable info. If this is null, the default of "%%" will be
used.Method Detail |
---|
public DatabaseChangeRecord.Builder changeNumber(long changeNumber)
changeNumber
- the change number
public DatabaseChangeRecord.Builder tableName(java.lang.String tableName)
tableName
- the table name
public DatabaseChangeRecord.Builder entryType(java.lang.String entryType)
entryType
- the type of database entry
public DatabaseChangeRecord.Builder changedColumns(java.lang.String[] changedColumns)
changedColumns
- an array of column names that were modified as part of the
change
public DatabaseChangeRecord.Builder modifier(java.lang.String modifier)
modifier
- the database account name
public DatabaseChangeRecord.Builder changeTime(long changeTime)
changeTime
- the time of the change (in milliseconds since epoch)
public DatabaseChangeRecord.Builder addProperty(java.lang.Object key, java.lang.Object value)
key
- the key for the propertyvalue
- the value of the property
public DatabaseChangeRecord build()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |