Class SimpleItem

java.lang.Object
com.denodo.scheduler.client.project.SimpleItem
All Implemented Interfaces:
Item, Serializable, Comparable<Item>

public class SimpleItem extends Object implements Item
Item of information that is not compound by another items.
See Also:
  • Field Details

    • serialVersionUID

      protected static final long serialVersionUID
      For interoperability with possible future changes.
      See Also:
  • Constructor Details

    • SimpleItem

      public SimpleItem()
    • SimpleItem

      public SimpleItem(int reference, String name, String type, boolean draft)
    • SimpleItem

      public SimpleItem(int reference, String name, String type, String subType, boolean draft)
    • SimpleItem

      public SimpleItem(int reference, String name, String type, String subType, boolean draft, String description)
  • Method Details

    • getReference

      public int getReference()
      Specified by:
      getReference in interface Item
      Returns:
      the reference
    • getName

      public String getName()
      Specified by:
      getName in interface Item
      Returns:
      the name
    • setName

      public void setName(String name)
      Specified by:
      setName in interface Item
      Parameters:
      name - the name to set
    • getType

      public String getType()
      Specified by:
      getType in interface Item
      Returns:
      the type
    • setType

      public void setType(String type)
      Parameters:
      type - the type to set
    • getSubType

      public String getSubType()
      Specified by:
      getSubType in interface Item
      Returns:
      the subType
    • setSubType

      public void setSubType(String subType)
      Parameters:
      subType - the subType to set
    • isDraft

      public boolean isDraft()
      Specified by:
      isDraft in interface Item
    • setDraft

      public void setDraft(boolean draft)
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Item
      Returns:
      the subType
    • setDescription

      public void setDescription(String description)
      Specified by:
      setDescription in interface Item
      Parameters:
      description - the description to set
    • add

      public boolean add(Item item)
      Specified by:
      add in interface Item
    • find

      public Item find(int itemRef)
      Specified by:
      find in interface Item
    • update

      public boolean update(int itemRef, Item item)
      Specified by:
      update in interface Item
    • remove

      public boolean remove(int itemref)
      Specified by:
      remove in interface Item
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Item
    • getValues

      public List getValues()
      Specified by:
      getValues in interface Item
    • addValidType

      public void addValidType(String validType)
      Specified by:
      addValidType in interface Item
    • isValidType

      public boolean isValidType(String valueType)
      Specified by:
      isValidType in interface Item
    • getValidTypes

      public Collection getValidTypes()
      Specified by:
      getValidTypes in interface Item
    • hashCode

      public int hashCode()
      Returns the hash code of an instance of this class. The resulting hash code is the sum of the name and value hash codes.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals(Object object)
      Returns whether an instance of this class is equals to the one passed as a parameter or not. This method returns true if the name and the value are equal for both parameters. Returns false otherwise.
      Overrides:
      equals in class Object
      Parameters:
      object - the instance to be compared to.
      Returns:
      true if this instance and the one passed as a parameter are equal, false otherwise.
    • compareTo

      public int compareTo(Item object)
      Defines the order of a SimpleItem in a Collection: its names appears in alphabetic order grouped by type and subtype. For comparing the Strings a Collator of TERTIARY strength dependent on the configured locales is used.
      Specified by:
      compareTo in interface Comparable<Item>
    • toString

      public String toString()
      Overrides:
      toString in class Object