org.talend.esb.sam.server.persistence.criterias
Class Criteria

java.lang.Object
  extended by org.talend.esb.sam.server.persistence.criterias.Criteria
Direct Known Subclasses:
DateCriteria, EnumCriteria, PatternCriteria

public abstract class Criteria
extends Object

Criterias used for searching and filtering.

Author:
zubairov

Field Summary
protected  String columnName
           
protected  String name
           
 
Constructor Summary
Criteria(String name, String colunmName)
          Instantiates a new criteria.
 
Method Summary
 boolean equals(Object obj)
           
abstract  StringBuilder getFilterClause()
          Returns something like (COLUMN = :name).
 String getName()
          Gets the name.
abstract  Object getValue()
          Returns a value of the Criteria that in suitable SQL type.
 int hashCode()
           
abstract  Criteria[] parseValue(String attribute)
          Creates a copy of the given Criteria populated with the parsed value or throws an exception.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name

columnName

protected final String columnName
Constructor Detail

Criteria

public Criteria(String name,
                String colunmName)
Instantiates a new criteria.

Parameters:
name - the name
colunmName - the colunm name
Method Detail

getName

public String getName()
Gets the name.

Returns:
the name

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

parseValue

public abstract Criteria[] parseValue(String attribute)
Creates a copy of the given Criteria populated with the parsed value or throws an exception.

Parameters:
attribute - the attribute
Returns:
the criteria[]

getValue

public abstract Object getValue()
Returns a value of the Criteria that in suitable SQL type.

Returns:
the value

getFilterClause

public abstract StringBuilder getFilterClause()
Returns something like (COLUMN = :name).

Returns:
the filter clause


Copyright © 2011-2012 Talend Inc.. All Rights Reserved.