Package nl.vpro.domain.media
Class StandaloneMemberRef
- java.lang.Object
-
- nl.vpro.domain.media.StandaloneMemberRef
-
- All Implemented Interfaces:
Serializable
,ParentChildRelation
,nl.vpro.domain.media.support.Ownable
@MappedSuperclass public class StandaloneMemberRef extends Object implements Serializable, nl.vpro.domain.media.support.Ownable, ParentChildRelation
An representation of a memberRef also having a 'memberRef' attribute in the XML. AMemberRef
doesn't have that because is always represented embedded in aMediaObject
. This object also hasgetObjectType()
to make it possible the distinguishProgram.getEpisodeOf()
fromMediaObject.getMemberOf()
. The original and use case of this object is to be a standalone JSON representation of a 'memberref' relation in poms in ElasticSearch. It is also annotated withjavax.persistence
annotations, which makes it possible to easily store this object in other databases too (though poms itself is not doing that).- Since:
- 4.7
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StandaloneMemberRef.Builder
static class
StandaloneMemberRef.IdType
static class
StandaloneMemberRef.ObjectType
-
Field Summary
Fields Modifier and Type Field Description protected Instant
added
protected String
childRef
protected Boolean
highlighted
protected Integer
index
protected String
midRef
protected StandaloneMemberRef.ObjectType
objectType
protected nl.vpro.domain.media.support.OwnerType
owner
protected MediaType
type
-
Constructor Summary
Constructors Constructor Description StandaloneMemberRef()
StandaloneMemberRef(String childRef, MemberRef ref, StandaloneMemberRef.ObjectType objectType)
StandaloneMemberRef(StandaloneMemberRef ref)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NonNull StandaloneMemberRef.Builder
builder()
static StandaloneMemberRef
episodeRef(String child, MemberRef ref)
boolean
equals(Object o)
Instant
getAdded()
String
getChildMid()
String
getChildRef()
Boolean
getHighlighted()
StandaloneMemberRef.IdType
getId()
Integer
getIndex()
String
getMidRef()
StandaloneMemberRef.ObjectType
getObjectType()
@NonNull nl.vpro.domain.media.support.OwnerType
getOwner()
MediaType
getType()
The type of the parentint
hashCode()
static StandaloneMemberRef
memberRef(String child, MemberRef ref)
void
setAdded(Instant added)
void
setChildRef(String childRef)
void
setHighlighted(Boolean highlighted)
void
setIndex(Integer index)
void
setMidRef(String midRef)
void
setObjectType(StandaloneMemberRef.ObjectType objectType)
void
setType(MediaType type)
MemberRef
toMemberRef()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.vpro.domain.media.ParentChildRelation
getParentMid
-
-
-
-
Field Detail
-
added
protected Instant added
-
highlighted
protected Boolean highlighted
-
type
protected MediaType type
-
index
protected Integer index
-
midRef
protected String midRef
-
childRef
protected String childRef
-
owner
protected nl.vpro.domain.media.support.OwnerType owner
-
objectType
protected StandaloneMemberRef.ObjectType objectType
-
-
Constructor Detail
-
StandaloneMemberRef
public StandaloneMemberRef()
-
StandaloneMemberRef
public StandaloneMemberRef(String childRef, MemberRef ref, StandaloneMemberRef.ObjectType objectType)
-
StandaloneMemberRef
public StandaloneMemberRef(StandaloneMemberRef ref)
-
-
Method Detail
-
memberRef
public static StandaloneMemberRef memberRef(String child, MemberRef ref)
-
episodeRef
public static StandaloneMemberRef episodeRef(String child, MemberRef ref)
-
getOwner
public @NonNull nl.vpro.domain.media.support.OwnerType getOwner()
- Specified by:
getOwner
in interfacenl.vpro.domain.media.support.Ownable
-
toMemberRef
public MemberRef toMemberRef()
-
getId
public StandaloneMemberRef.IdType getId()
-
getAdded
public Instant getAdded()
-
setAdded
public void setAdded(Instant added)
-
getHighlighted
public Boolean getHighlighted()
-
setHighlighted
public void setHighlighted(Boolean highlighted)
-
getType
public MediaType getType()
Description copied from interface:ParentChildRelation
The type of the parent- Specified by:
getType
in interfaceParentChildRelation
-
setType
public void setType(MediaType type)
-
getIndex
public Integer getIndex()
-
setIndex
public void setIndex(Integer index)
-
getMidRef
public String getMidRef()
- Specified by:
getMidRef
in interfaceParentChildRelation
-
setMidRef
public void setMidRef(String midRef)
-
getChildRef
public String getChildRef()
-
setChildRef
public void setChildRef(String childRef)
-
getChildMid
public String getChildMid()
- Specified by:
getChildMid
in interfaceParentChildRelation
-
getObjectType
public StandaloneMemberRef.ObjectType getObjectType()
-
setObjectType
public void setObjectType(StandaloneMemberRef.ObjectType objectType)
-
builder
public static @NonNull StandaloneMemberRef.Builder builder()
-
-