2.17.2: 2011-06-17

net.sf.basedb.core.data
Class AnyToAnyData

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

public class AnyToAnyData
extends BasicData
implements NameableData

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, Misc overview
Last modified
$Date: 2008-09-11 22:11:02 +0200 (Thu, 11 Sep 2008) $
Hibernate: class
table="`AnyToAny`" lazy="false"

Field Summary
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
AnyToAnyData()
           
 
Method Summary
 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 Detail

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 Detail

AnyToAnyData

public AnyToAnyData()
Method Detail

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="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="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="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)

2.17.2: 2011-06-17