Package net.sf.basedb.core.data
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 Summary
Modifier and TypeFieldDescriptionprivate String
private int
private int
private String
private int
private int
private boolean
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the description for the item.int
The ID of the item we are linking from.int
The type code of the item we are linking from.getName()
Get the name of the item.int
getToId()
The ID of the item we are linking to.int
The type code of the item we are linking to.boolean
If the link counts as using the item we are linking to.void
setDescription
(String description) Set the description for the item.void
setFromId
(int fromId) void
setFromType
(int fromType) void
Set the name of the item.void
setToId
(int toId) void
setToType
(int toType) void
setUsingTo
(boolean usesTo) Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Field Details
-
name
-
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
Description copied from interface:NameableData
Get the name of the item.- Specified by:
getName
in interfaceNameableData
- 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
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 theMAX_NAME_LENGTH
constant.- Specified by:
setName
in interfaceNameableData
- Parameters:
name
- The new name for the item
-
getDescription
Description copied from interface:NameableData
Get the description for the item.- Specified by:
getDescription
in interfaceNameableData
- Returns:
- A
String
with a description of the item
-
setDescription
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 theMAX_DESCRIPTION_LENGTH
constant.- Specified by:
setDescription
in interfaceNameableData
- 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)
-