Class AnyToAnyData

java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.AnyToAnyData
All Implemented Interfaces:
IdentifiableData, LoggableData, NameableData, NoAutoUnlinkAnyToAny

public class AnyToAnyData extends BasicData implements NameableData, LoggableData, NoAutoUnlinkAnyToAny
Represents a link from one item to any other item. The links are loosely coupled and are not using foreign keys.
Version:
2.0
Author:
nicklas
See Also:
Last modified
$Date: 2024-05-16 14:10:25 +0200 (Thu, 16 May 2024) $
Hibernate: class
table="`AnyToAny`" lazy="false"
  • Field Details

    • name

      private String name
    • description

      private String description
    • fromId

      private int fromId
    • fromType

      private int fromType
    • toId

      private int toId
    • toType

      private int toType
    • usesTo

      private boolean usesTo
  • Constructor Details

    • AnyToAnyData

      public AnyToAnyData()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NameableData
      Get the name of the item.
      Specified by:
      getName in interface NameableData
      Returns:
      A String with the name of the item
      Hibernate: property
      type="string"
      Hibernate: column
      name="`name`" length="255" not-null="true" index="name_idx" unique-key="AnyToAny_uniquelink"
    • setName

      public void setName(String name)
      Description copied from interface: NameableData
      Set the name of the item. The name cannot be null and mustn't be longer than the value specified by the MAX_NAME_LENGTH constant.
      Specified by:
      setName in interface NameableData
      Parameters:
      name - The new name for the item
    • getDescription

      public String getDescription()
      Description copied from interface: NameableData
      Get the description for the item.
      Specified by:
      getDescription in interface NameableData
      Returns:
      A String with a description of the item
    • setDescription

      public void setDescription(String description)
      Description copied from interface: NameableData
      Set the description for the item. The description can be null but mustn't be longer than the value specified by the MAX_DESCRIPTION_LENGTH constant.
      Specified by:
      setDescription in interface NameableData
      Parameters:
      description - The new description for the item
    • getFromId

      public int getFromId()
      The ID of the item we are linking from.
      Hibernate: property
      type="int"
      Hibernate: column
      name="`from_id`" not-null="true" unique-key="AnyToAny_uniquelink" index="fromitem"
    • setFromId

      public void setFromId(int fromId)
    • getFromType

      public int getFromType()
      The type code of the item we are linking from.
      Hibernate: property
      type="int"
      Hibernate: column
      name="`from_type`" not-null="true" unique-key="AnyToAny_uniquelink" index="fromitem"
    • setFromType

      public void setFromType(int fromType)
    • getToId

      public int getToId()
      The ID of the item we are linking to.
      Hibernate: property
      type="int"
      Hibernate: column
      name="`to_id`" not-null="true" index="toitem"
    • setToId

      public void setToId(int toId)
    • getToType

      public int getToType()
      The type code of the item we are linking to.
      Hibernate: property
      type="int"
      Hibernate: column
      name="`to_type`" not-null="true" index="toitem"
    • setToType

      public void setToType(int toType)
    • isUsingTo

      public boolean isUsingTo()
      If the link counts as using the item we are linking to.
      Hibernate: property
      column="`uses_to`" type="boolean" not-null="true"
    • setUsingTo

      public void setUsingTo(boolean usesTo)