public final class SyncEntity extends ParamsEntity
Instances of this class supply an object implementing the Sync
interface.
Modifier and Type | Class and Description |
---|---|
static class |
SyncEntity.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT_NAME
Sync element name.
|
static String |
ENTITY_PREFIX
Sync entity prefix.
|
static String |
ENTITY_REFERENCE_NAME
Sync entity reference name.
|
UUID_COMPARATOR
Modifier | Constructor and Description |
---|---|
protected |
SyncEntity(Optional<String> name,
Optional<UUID> uuid,
Optional<KeyedGroups> attributes,
Optional<Map<String,Text>> texts,
Optional<Params> params,
ClassDefEntity classDef,
Optional<Sync> sync)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
SyncEntity |
copy()
Creates a copy of this entity.
|
boolean |
equals(Object other)
|
ClassDefEntity |
getClassDef()
Gets the classDef.
|
String |
getElementName()
Gets the entity element name.
|
String |
getPrefix()
Gets the class prefix.
|
String |
getReferenceName()
Gets the entity reference name.
|
Sync |
getSync()
Gets a Sync instance.
|
int |
hashCode() |
static SyncEntity.Builder |
newBuilder()
Returns a new builder.
|
boolean |
setUp()
Sets up this.
|
void |
tearDown()
Tears down what has been set up.
|
getParams, setParams
addText, getAttributes, getAttributes, getTexts, setAttributes
compareTo, getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID, toString
public static final String ELEMENT_NAME
public static final String ENTITY_PREFIX
public static final String ENTITY_REFERENCE_NAME
protected SyncEntity(@Nonnull Optional<String> name, @Nonnull Optional<UUID> uuid, @Nonnull Optional<KeyedGroups> attributes, @Nonnull Optional<Map<String,Text>> texts, @Nonnull Optional<Params> params, @Nonnull ClassDefEntity classDef, @Nonnull Optional<Sync> sync)
name
- The optional entity name.uuid
- The optional entity UUID.attributes
- The optional attributes.texts
- The optional texts.params
- The optional params.classDef
- The class definition.sync
- The optional Sync instance.@Nonnull @CheckReturnValue public static SyncEntity.Builder newBuilder()
public SyncEntity copy()
public boolean equals(Object other)
For two Entity
to be equal, they must at least be instances of
the same class, have the same UUID
and name.
For two Metadata
Entity
to be equal, they must at
least be instances of the same class, have the same UUID
,
Attributes
, name and descriptive texts.
equals
in class ParamsEntity
@Nonnull @CheckReturnValue public ClassDefEntity getClassDef()
public String getElementName()
The entity element is used to in the generation of the entity URI.
public String getPrefix()
Each concrete entity subclass has its own prefix which will be the same for all its instances. This prefix is used to avoid name collision between different classes in a common registry.
public String getReferenceName()
@Nonnull @CheckReturnValue public Sync getSync()
public int hashCode()
hashCode
in class ParamsEntity
@CheckReturnValue public boolean setUp()
public void tearDown()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.