org.geebis.books.model.label
Class Label
java.lang.Object
org.geebis.books.model.label.Label
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AccountLabel, AccountUsageLabel, CustomerLabel, EmployeeLabel, GenericLabel, ItemLabel, JobLabel, ManufacturerLabel, TrackableLabel, VendorLabel
@Name(value="label")
public abstract class Label
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
|
Constructor Summary |
|
Label()
|
protected |
Label(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Label
public Label()
Label
protected Label(java.lang.String name)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getVersion
public java.lang.Integer getVersion()
setVersion
public void setVersion(java.lang.Integer version)
getId
public java.lang.Long getId()
setId
public void setId(java.lang.Long id)
addLabel
public static void addLabel(Labelable labelable,
Label label)
throws IncompatibleLabelException
- Adds a label to a labelable object.
- Parameters:
labelable - the object to add the label tolabel - the label to add
- Throws:
IncompatibleLabelException - if the label isn't compatible with
the labelable object
removeLabel
public static void removeLabel(Labelable labelable,
Label label)
- Removes the label from the labelable object
- Parameters:
labelable - the object to remove the label fromlabel - the label to remove
isLabelCompatible
public static boolean isLabelCompatible(Labelable labelable,
Label label)
- Determines if the label can be added to the labelable object
- Parameters:
labelable - the object that the label is tested againstlabel - the label that the user is trying to apply
- Returns:
- true if the label can be applied to labelable, false if otherwise