Class MutableEntityExtendedImp
java.lang.Object
net.tangly.core.MutableEntityExtendedImp
- All Implemented Interfaces:
Entity,EntityExtended,HasComments,HasDateRange,HasId,HasMutableComments,HasMutableDateRange,HasMutableId,HasMutableName,HasMutableTags,HasMutableText,HasName,HasOid,HasTags,HasText,MutableEntity,MutableEntityExtended
public abstract class MutableEntityExtendedImp
extends Object
implements HasDateRange, MutableEntityExtended
Default implementation of the
MutableEntityExtended interface. The unique object identifier shall be set at construction.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.tangly.core.HasDateRange
HasDateRange.RangeFilter<T extends HasDateRange> -
Field Summary
Fields inherited from interface net.tangly.core.HasDateRange
FROM, TOFields inherited from interface net.tangly.core.HasMutableName
NAMEFields inherited from interface net.tangly.core.HasOid
OID, UNDEFINED_OID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a comment to the list of comments.booleanAdd the tag to the collection of tags.voidclear()comments()Return the collection of comments owned by the entity.voidcomments(Collection<Comment> comments) Set the new collection of comments.booleaninthashCode()id()Return the unique external identifier of the instance.voidSet the identifier of the instance.static <T extends MutableEntityExtended>
Tname()voidlongoid()Return the unique internal identifier of the instance.range()Return the range of the mixin.voidvoidRemove the given comment from the list of comments.booleanRemove the tag from the collection of tags.tags()Returns the collection of tags for the entity.voidtags(@NotNull Collection<Tag> tags) Set the new collection of tags for the entity.text()Return the human-readable text description of the instance.voidSet the text description of the entity.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.tangly.core.HasComments
findByAuthor, findByTag, findByTimeMethods inherited from interface net.tangly.core.HasDateRange
from, isActive, isActive, toMethods inherited from interface net.tangly.core.HasMutableComments
addCommentsMethods inherited from interface net.tangly.core.HasMutableDateRange
from, toMethods inherited from interface net.tangly.core.HasMutableTags
addTags, rawTags, removeTagNamed, update, updateMethods inherited from interface net.tangly.core.HasTags
containsTag, containsTag, findBy, findBy, findByNamespace, rawTags, value, valueMethods inherited from interface net.tangly.core.MutableEntity
validate
-
Constructor Details
-
MutableEntityExtendedImp
protected MutableEntityExtendedImp(long oid)
-
-
Method Details
-
init
-
oid
-
id
-
id
Description copied from interface:HasMutableIdSet the identifier of the instance.- Specified by:
idin interfaceHasMutableId- Parameters:
id- new ID of the instance.
-
name
-
name
- Specified by:
namein interfaceHasMutableName
-
range
Description copied from interface:HasDateRangeReturn the range of the mixin.- Specified by:
rangein interfaceHasDateRange- Returns:
- date range of the mixin
-
range
- Specified by:
rangein interfaceHasMutableDateRange
-
text
-
text
Description copied from interface:HasMutableTextSet the text description of the entity.- Specified by:
textin interfaceHasMutableText- Parameters:
text- human readable text description- See Also:
-
comments
Description copied from interface:HasCommentsReturn the collection of comments owned by the entity.- Specified by:
commentsin interfaceHasComments- Returns:
- list of comments
-
comments
Description copied from interface:HasMutableCommentsSet the new collection of comments.- Specified by:
commentsin interfaceHasMutableComments- Parameters:
comments- new collection of comments- See Also:
-
add
Description copied from interface:HasMutableCommentsAdds a comment to the list of comments.- Specified by:
addin interfaceHasMutableComments- Parameters:
comment- comment to be added, cannot be null
-
remove
Description copied from interface:HasMutableCommentsRemove the given comment from the list of comments.- Specified by:
removein interfaceHasMutableComments- Parameters:
comment- comment to be removed, cannot be null
-
tags
Description copied from interface:HasTagsReturns the collection of tags for the entity. -
tags
Description copied from interface:HasMutableTagsSet the new collection of tags for the entity.- Specified by:
tagsin interfaceHasMutableTags- Parameters:
tags- new collection of tags- See Also:
-
add
Description copied from interface:HasMutableTagsAdd the tag to the collection of tags.- Specified by:
addin interfaceHasMutableTags- Parameters:
tag- tag to be added- Returns:
trueif this collection did not already contain the specified element- See Also:
-
remove
Description copied from interface:HasMutableTagsRemove the tag from the collection of tags.- Specified by:
removein interfaceHasMutableTags- Parameters:
tag- tag to remove- Returns:
trueif this collection contained the specified element- See Also:
-
clear
public void clear()- Specified by:
clearin interfaceHasMutableTags
-
hashCode
-
equals
-