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
public class AnyToAnyData extends BasicData implements NameableData, LoggableData
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:
AnyToAny
, Developer documentation: Other classes- Last modified
- $Date: 2014-06-10 13:27:02 +0200 (ti, 10 jun 2014) $
- Hibernate: class
- table="`AnyToAny`" lazy="false"
-
Field Summary
Fields Modifier and Type Field Description private String
description
private int
fromId
private int
fromType
private String
name
private int
toId
private int
toType
private boolean
usesTo
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
Constructors Constructor Description AnyToAnyData()
-
Method Summary
Modifier and Type Method Description String
getDescription()
Get the description for the item.int
getFromId()
The ID of the item we are linking from.int
getFromType()
The type code of the item we are linking from.String
getName()
Get the name of the item.int
getToId()
The ID of the item we are linking to.int
getToType()
The type code of the item we are linking to.boolean
isUsingTo()
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
setName(String name)
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"
-
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"
-
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)
-