public static class DatabaseChangeRecord.Builder extends java.lang.Object
DatabaseChangeRecord.ChangeType and an identifiableInfo DN 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 and Description |
|---|
Builder(DatabaseChangeRecord.ChangeType type,
com.unboundid.ldap.sdk.DN identifiableInfo)
Creates a Builder which can be used to construct a DatabaseChangeRecord.
|
Builder(DatabaseChangeRecord.ChangeType type,
java.lang.String identifiableInfo)
Creates a Builder which can be used to construct a DatabaseChangeRecord.
|
Builder(DatabaseChangeRecord.ChangeType type,
java.lang.String identifiableInfo,
java.lang.String delimiter)
Creates a Builder which can be used to construct a DatabaseChangeRecord.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public 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. "accountID=123"). If multiple attributes are part of
the identifier, they should be separate RDN components of the DN
(i.e. "accountID=123,groupID=5").public 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. "accountID=123"). If multiple attributes are part of
the identifier, they should be delimited with the default
delimiter of "%%" (i.e. "accountID=123%%groupID=5").public 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. "accountID=123"). If multiple attributes are part of
the identifier, they should be delimited with a unique string
(i.e. "accountID=123%%groupID=5") which is specified by the
delimiter parameter.delimiter - The delimiter used to split separate components of the
identifiable info. If this is null, the default of "%%" will be
used.public DatabaseChangeRecord.Builder changeNumber(long changeNumber)
changeNumber - the change numberpublic DatabaseChangeRecord.Builder tableName(java.lang.String tableName)
tableName - the table namepublic DatabaseChangeRecord.Builder entryType(java.lang.String entryType)
entryType - the type of database entrypublic DatabaseChangeRecord.Builder changedColumns(java.lang.String[] changedColumns)
changedColumns - an array of column names that were modified as part of the
changepublic DatabaseChangeRecord.Builder modifier(java.lang.String modifier)
modifier - the database account namepublic DatabaseChangeRecord.Builder changeTime(long changeTime)
changeTime - the time of the change (in milliseconds since
January 1, 1970 00:00:00.000 GMT)public DatabaseChangeRecord.Builder addProperty(java.lang.Object key, java.lang.Object value)
null.key - the key for the propertyvalue - the value of the propertypublic DatabaseChangeRecord build()