Package org.gbif.api.model.registry
Class MachineTag
- java.lang.Object
-
- org.gbif.api.model.registry.MachineTag
-
- All Implemented Interfaces:
Serializable
,LenientEquals<MachineTag>
public class MachineTag extends Object implements LenientEquals<MachineTag>, Serializable
A tag that has a namespace, name and a value.created
andcreatedBy
are automatically set upon persisting.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MachineTag()
MachineTag(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
getCreated()
@Size(min=3) String
getCreatedBy()
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer
getKey()
@NotNull @Size(min=1,max=255) String
getName()
@NotNull @Size(min=1,max=255) String
getNamespace()
@NotNull @Size(min=1,max=700) String
getValue()
int
hashCode()
boolean
lenientEquals(MachineTag other)
This implementation of theequals(Object)
method does only check business equality and disregards automatically set and maintained fields likecreatedBy, key
and possibly others in the future.static MachineTag
newInstance(String namespace, String name, String value)
static MachineTag
newInstance(TagName tagName, String value)
void
setCreated(Date created)
void
setCreatedBy(String createdBy)
void
setKey(Integer key)
void
setName(String name)
void
setNamespace(String namespace)
void
setValue(String value)
String
toString()
-
-
-
Constructor Detail
-
MachineTag
public MachineTag()
-
MachineTag
public MachineTag(String namespace, String name, String value)
This is the default constructor to create new Machine Tags which takes all user settable properties.
-
MachineTag
public MachineTag(TagName tagName, String value)
This is the other constructor to create new Machine Tags which takes all user settable properties.
-
-
Method Detail
-
newInstance
public static MachineTag newInstance(String namespace, String name, String value)
-
newInstance
public static MachineTag newInstance(TagName tagName, String value)
-
getKey
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer getKey()
-
getNamespace
@NotNull @Size(min=1, max=255) public @NotNull @Size(min=1,max=255) String getNamespace()
-
setNamespace
public void setNamespace(String namespace)
-
getCreatedBy
@Size(min=3) public @Size(min=3) String getCreatedBy()
-
setCreatedBy
public void setCreatedBy(String createdBy)
-
getCreated
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated()
-
setCreated
public void setCreated(Date created)
-
lenientEquals
public boolean lenientEquals(MachineTag other)
This implementation of theequals(Object)
method does only check business equality and disregards automatically set and maintained fields likecreatedBy, key
and possibly others in the future.- Specified by:
lenientEquals
in interfaceLenientEquals<MachineTag>
- Parameters:
other
- To compare against- Returns:
- true if...
-
-