Class Cord
- java.lang.Object
-
- com.priint.pubserver.plugin.entitydata.Cord
-
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,java.io.Serializable
@Entity public class Cord extends java.lang.Object implements java.io.Serializable, GetContext, GetIdentifier, GetSequence, EntityData, PersistentData
Object of entity type Cord represent n:m relationship between buckets.A cord can contain its own content. For this cases the cord is related to a third bucket representing the connection content.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, source and destination buckets by reference not by inclusion, added JPA annotations
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCord.properties
-
Constructor Summary
Constructors Constructor Description Cord()Default constructor.Cord(java.lang.String identifier, java.lang.String label, Context context, java.lang.String entityCordId, Bucket sourceBucket, Bucket destinationBucket)Creates a cord between a source and a destination bucket.Cord(java.lang.String identifier, java.lang.String label, Context context, java.lang.String entityCordId, Bucket sourceBucket, Bucket destinationBucket, java.lang.String createdBy, java.util.Date createdOn, java.lang.String updatedBy, java.util.Date updatedOn)Creates a cord between a source and a destination bucket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorEntitygetConnectorEntity()BucketgetContentBucket()Get ContentBucket collecting MediaAssets, Texts, KeyValues, etc.java.util.List<ContentMetaData>getContentMetaData()ContextgetContext()Get the context for this element ornullif not set.java.lang.StringgetCreatedBy()java.util.DategetCreatedOn()BucketgetDestinationBucket()Get the destination bucket of a cord.java.lang.StringgetDestinationBucketId()java.lang.StringgetDestinationLabel()EntityCordgetEntity()java.lang.StringgetEntityCordId()java.lang.StringgetEntityIdentifier()Identifier of an entity in the entity model where the current object refers to.java.lang.StringgetGroupIdentifier()String key for grouping cords of the same type.java.lang.StringgetIdentifier()Get the string identifier of the cord.java.lang.StringgetLabel()Display label for the cord.java.util.List<KeyValue>getMetaData()java.lang.StringgetOrigin()intgetSequence()Get sequence number for the cord as given in the content system.BucketgetSourceBucket()Get the source bucket of a cord.java.lang.StringgetSourceBucketId()java.lang.StringgetSourceLabel()java.lang.StringgetTemplate()Get String identifier of the priint:comet template.java.lang.StringgetTimestamp()Get timestamp from the content system.java.lang.StringgetUpdatedBy()java.util.DategetUpdatedOn()java.lang.StringgetVersion()Version string from the content systemvoidsetConnectorEntity(ConnectorEntity connectorEntity)voidsetContentBucket(Bucket contentBucket)voidsetContentMetaData(java.util.List<ContentMetaData> contentMetaData)voidsetContext(Context context)set the context of entity data objectvoidsetCreatedBy(java.lang.String createdBy)voidsetCreatedOn(java.util.Date createdOn)voidsetDestinationBucket(Bucket destinationBucket)voidsetDestinationBucketId(java.lang.String destinationBucketId)Sets destinationBucketId and eventually removes current destinationBucket if it does not match the idvoidsetDestinationLabel(java.lang.String destinationLabel)voidsetEntity(EntityCord entityCord)Sets entityCord and entityCordId.voidsetEntityCordId(java.lang.String entityCordId)Sets entityCordId and eventually removes current entityCord if it does not match the idvoidsetEntityIdentifier(java.lang.String entityIdentifier)Identifier of an entity in the entity model where the current object refers to.voidsetGroupIdentifier(java.lang.String groupIdentifier)voidsetIdentifier(java.lang.String identifier)voidsetLabel(java.lang.String label)voidsetMetaData(java.util.List<KeyValue> metaData)voidsetOrigin(java.lang.String origin)voidsetSequence(int sequence)voidsetSourceBucket(Bucket sourceBucket)voidsetSourceBucketId(java.lang.String sourceBucketId)Sets sourceBucketId and eventually removes current sourceBucket if it does not match the idvoidsetSourceLabel(java.lang.String sourceLabel)voidsetTemplate(java.lang.String template)voidsetTimestamp(java.lang.String timestamp)voidsetUpdatedBy(java.lang.String updatedBy)voidsetUpdatedOn(java.util.Date updatedOn)voidsetVersion(java.lang.String version)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Cord
public Cord()
Default constructor.
-
Cord
public Cord(java.lang.String identifier, java.lang.String label, Context context, java.lang.String entityCordId, Bucket sourceBucket, Bucket destinationBucket)Creates a cord between a source and a destination bucket.- Parameters:
sourceBucket- seegetSourceBucket()destinationBucket- seegetDestinationBucket()identifier- seegetIdentifier()label- seegetLabel()entityCordId- seegetEntityCordId()context- seegetContext()- Since:
- 4.0.0
-
Cord
public Cord(java.lang.String identifier, java.lang.String label, Context context, java.lang.String entityCordId, Bucket sourceBucket, Bucket destinationBucket, java.lang.String createdBy, java.util.Date createdOn, java.lang.String updatedBy, java.util.Date updatedOn)Creates a cord between a source and a destination bucket.- Parameters:
sourceBucket- seegetSourceBucket()destinationBucket- seegetDestinationBucket()identifier- seegetIdentifier()label- seegetLabel()entityCordId- seegetEntityCordId()context- seegetContext()createdBy- seegetCreatedBy()createdOn- seegetCreatedOn()updatedBy- seegetUpdatedBy()updatedOn- seegetUpdatedOn()
-
-
Method Detail
-
getEntity
public EntityCord getEntity()
- Returns:
- the cord entity object associated with the current cord or null if not set
- Since:
- 4.0.0
- See Also:
getEntityCordId()
-
setEntity
public void setEntity(EntityCord entityCord)
Sets entityCord and entityCordId.- Parameters:
entityCord- seegetEntity()
-
getSourceBucket
public Bucket getSourceBucket()
Get the source bucket of a cord.- Returns:
- Source bucket or null
-
setSourceBucket
public void setSourceBucket(Bucket sourceBucket)
- Parameters:
sourceBucket- seegetSourceBucket()
-
getSourceLabel
public java.lang.String getSourceLabel()
- Returns:
- Display name for the "from Bucket" relationship
-
setSourceLabel
public void setSourceLabel(java.lang.String sourceLabel)
- Parameters:
sourceLabel- seegetSourceLabel()
-
getDestinationBucket
public Bucket getDestinationBucket()
Get the destination bucket of a cord.- Returns:
- Destination bucket or null
-
setDestinationBucket
public void setDestinationBucket(Bucket destinationBucket)
- Parameters:
destinationBucket- seegetDestinationBucket()
-
getDestinationLabel
public java.lang.String getDestinationLabel()
- Returns:
- Display name for the "to Bucket" relationship
-
setDestinationLabel
public void setDestinationLabel(java.lang.String destinationLabel)
- Parameters:
destinationLabel- seegetDestinationLabel()
-
getContentBucket
public Bucket getContentBucket()
Get ContentBucket collecting MediaAssets, Texts, KeyValues, etc. related to the cord.- Returns:
- bucket or null
-
setContentBucket
public void setContentBucket(Bucket contentBucket)
- Parameters:
contentBucket- seegetContentBucket()
-
getEntityCordId
public java.lang.String getEntityCordId()
- Returns:
- identifier of the cord entity or
nullif not set
-
setEntityCordId
public void setEntityCordId(java.lang.String entityCordId)
Sets entityCordId and eventually removes current entityCord if it does not match the id- Parameters:
entityCordId- seegetEntityCordId()- Since:
- 4.0.0
-
getConnectorEntity
public ConnectorEntity getConnectorEntity()
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
public void setConnectorEntity(ConnectorEntity connectorEntity)
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getContext
public Context getContext()
Get the context for this element ornullif not set.- Specified by:
getContextin interfaceEntityData- Specified by:
getContextin interfaceGetContext- Returns:
- context
-
setContext
public void setContext(Context context)
Description copied from interface:EntityDataset the context of entity data object- Specified by:
setContextin interfaceEntityData- Parameters:
context-getContext()
-
getCreatedBy
public java.lang.String getCreatedBy()
- Returns:
- creation user or
nullif not set
-
setCreatedBy
public void setCreatedBy(java.lang.String createdBy)
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
public java.util.Date getCreatedOn()
- Returns:
- creation date or
nullif not set
-
setCreatedOn
public void setCreatedOn(java.util.Date createdOn)
- Parameters:
createdOn- seegetCreatedOn()
-
getGroupIdentifier
public java.lang.String getGroupIdentifier()
String key for grouping cords of the same type.- Returns:
- group identifier string or
nullif not set
-
setGroupIdentifier
public void setGroupIdentifier(java.lang.String groupIdentifier)
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getIdentifier
public java.lang.String getIdentifier()
Get the string identifier of the cord.Will be used as RecordID in priint:comet.
- Specified by:
getIdentifierin interfaceEntityData- Specified by:
getIdentifierin interfaceGetIdentifier- Specified by:
getIdentifierin interfacePersistentData- Returns:
- identifier string or
nullif not set
-
setIdentifier
public void setIdentifier(java.lang.String identifier)
- Specified by:
setIdentifierin interfaceEntityData- Parameters:
identifier- seegetIdentifier()
-
getLabel
public java.lang.String getLabel()
Display label for the cord.- Returns:
- label or
nullif not set
-
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label- seegetLabel()
-
getMetaData
public java.util.List<KeyValue> getMetaData()
- Returns:
- List of meta data related to the cord or empty list.
List is LAZY loaded.
-
setMetaData
public void setMetaData(java.util.List<KeyValue> metaData)
- Parameters:
metaData- seegetMetaData()
-
getSequence
public int getSequence()
Get sequence number for the cord as given in the content system.This should reflect the position of the current cord in the sorting of cords of its sourceBucket.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence)
- Parameters:
sequence- seegetSequence()
-
getTemplate
public java.lang.String getTemplate()
Get String identifier of the priint:comet template.- Returns:
- template id or null if not set
-
setTemplate
public void setTemplate(java.lang.String template)
- Parameters:
template- seegetTemplate()
-
getTimestamp
public java.lang.String getTimestamp()
Get timestamp from the content system.Timestamp is used as a string to support differing types of timestamp representation as used by different content system. publishing server does not validate any format of this string.
- Returns:
- timestamp string
-
setTimestamp
public void setTimestamp(java.lang.String timestamp)
- Parameters:
timestamp- seegetTimestamp()
-
getVersion
public java.lang.String getVersion()
Version string from the content system- Returns:
- version string or
nullif not set
-
setVersion
public void setVersion(java.lang.String version)
- Parameters:
version- seegetVersion()
-
getUpdatedBy
public java.lang.String getUpdatedBy()
- Returns:
- last modified user or
nullif not set
-
setUpdatedBy
public void setUpdatedBy(java.lang.String updatedBy)
- Parameters:
updatedBy- seegetUpdatedBy()
-
getUpdatedOn
public java.util.Date getUpdatedOn()
- Returns:
- last modified date or
nullif not set
-
setUpdatedOn
public void setUpdatedOn(java.util.Date updatedOn)
- Parameters:
updatedOn- seegetUpdatedOn()
-
getSourceBucketId
public final java.lang.String getSourceBucketId()
- Returns:
- Identifier of related source bucket.
-
setSourceBucketId
public final void setSourceBucketId(java.lang.String sourceBucketId)
Sets sourceBucketId and eventually removes current sourceBucket if it does not match the id- Parameters:
sourceBucketId-getSourceBucketId()
-
getDestinationBucketId
public final java.lang.String getDestinationBucketId()
- Returns:
- Identifier of related destination bucket.
-
setDestinationBucketId
public final void setDestinationBucketId(java.lang.String destinationBucketId)
Sets destinationBucketId and eventually removes current destinationBucket if it does not match the id- Parameters:
destinationBucketId-getDestinationBucketId()
-
getOrigin
public java.lang.String getOrigin()
- Returns:
- Origin of data entity object, e.g. name of the source system. This property is filled by the connector. Might return
null.
-
setOrigin
public void setOrigin(java.lang.String origin)
- Parameters:
origin-getOrigin()
-
getEntityIdentifier
public java.lang.String getEntityIdentifier()
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
getEntityIdentifierin interfaceEntityData- Returns:
- entity identifier as string
-
setEntityIdentifier
public void setEntityIdentifier(java.lang.String entityIdentifier)
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
setEntityIdentifierin interfaceEntityData
-
getContentMetaData
public java.util.List<ContentMetaData> getContentMetaData()
- Returns:
- List of ContentMetaData related to Cord.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
public void setContentMetaData(java.util.List<ContentMetaData> contentMetaData)
- Parameters:
contentMetaData-getContentMetaData()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-