Package org.gbif.api.model.registry
Class MachineTag
java.lang.Object
org.gbif.api.model.registry.MachineTag
- All Implemented Interfaces:
Serializable,LenientEquals<MachineTag>
A tag that has a namespace, name and a value.
created and createdBy are automatically set upon
persisting.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMachineTag(String namespace, String name, String value) This is the default constructor to create new Machine Tags which takes all user settable properties.MachineTag(TagName tagName, String value) This is the other constructor to create new Machine Tags which takes all user settable properties. -
Method Summary
Modifier and TypeMethodDescriptionboolean@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date@Size(min=3) String@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) IntegergetKey()@NotNull @Size(min=1,max=255) StringgetName()@NotNull @Size(min=1,max=255) String@NotNull @Size(min=1,max=700) StringgetValue()inthashCode()booleanlenientEquals(MachineTag other) This implementation of theequals(Object)method does only check business equality and disregards automatically set and maintained fields likecreatedBy, keyand possibly others in the future.static MachineTagnewInstance(String namespace, String name, String value) static MachineTagnewInstance(TagName tagName, String value) voidsetCreated(Date created) voidsetCreatedBy(String createdBy) voidvoidvoidsetNamespace(String namespace) voidtoString()
-
Constructor Details
-
MachineTag
public MachineTag() -
MachineTag
This is the default constructor to create new Machine Tags which takes all user settable properties. -
MachineTag
This is the other constructor to create new Machine Tags which takes all user settable properties.
-
-
Method Details
-
newInstance
-
newInstance
-
getKey
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer getKey() -
setKey
-
getNamespace
-
setNamespace
-
getName
-
setName
-
getValue
-
setValue
-
getCreatedBy
-
setCreatedBy
-
getCreated
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated() -
setCreated
-
equals
-
hashCode
-
toString
-
lenientEquals
This implementation of theequals(Object)method does only check business equality and disregards automatically set and maintained fields likecreatedBy, keyand possibly others in the future.- Specified by:
lenientEqualsin interfaceLenientEquals<MachineTag>- Parameters:
other- To compare against- Returns:
- true if...
-