it.unimi.dico.islab.idbs2.map
Class Relation

java.lang.Object
  extended by it.unimi.dico.islab.idbs2.map.Relation

public class Relation
extends Object

Representation of a custom comparison relation. The role of this class is to act as a wrapper for the relation describing a similarity comparison. Examples:

Author:
Vegeziel

Constructor Summary
protected Relation()
           Empty constructor for Hibernate compatibility.
  Relation(String symbol, String description)
           Main constructor for this class.
 
Method Summary
 String getDescription()
           
 String getSymbol()
           
 void setDescription(String description)
           
 void setSymbol(String symbol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Relation

protected Relation()

Empty constructor for Hibernate compatibility. Direct use is discouraged.


Relation

public Relation(String symbol,
                String description)

Main constructor for this class. Returns a new instance of a Relation. Warning: this method just creates a new Relation instance without checking if an identical instance is present on the database. Using this method, primary key constraints must be checked manually.

Parameters:
symbol - a symbol representing the relation (e.g. the symbol "=" for the equality relation).
description - the description of this relation (e.g. the word "Equality" for the equality relation).
Method Detail

getSymbol

public String getSymbol()

setSymbol

public void setSymbol(String symbol)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)