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

java.lang.Object
  extended by org.talend.esb.sam.server.persistence.criterias.Criteria
      extended by org.talend.esb.sam.server.persistence.criterias.EnumCriteria

public class EnumCriteria
extends Criteria

Criteria based on enumeration.

Author:
zubairov

Field Summary
protected  Enum<?> value
           
 
Fields inherited from class org.talend.esb.sam.server.persistence.criterias.Criteria
columnName, name
 
Constructor Summary
EnumCriteria(String name, String colunmName, Class<? extends Enum> clazz)
          Instantiates a new enum criteria.
 
Method Summary
 StringBuilder getFilterClause()
          Returns something like (COLUMN = :name).
 Object getValue()
          Returns a value of the Criteria that in suitable SQL type.
 Criteria[] parseValue(String value)
          Creates a copy of the given Criteria populated with the parsed value or throws an exception.
 
Methods inherited from class org.talend.esb.sam.server.persistence.criterias.Criteria
equals, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected Enum<?> value
Constructor Detail

EnumCriteria

public EnumCriteria(String name,
                    String colunmName,
                    Class<? extends Enum> clazz)
Instantiates a new enum criteria.

Parameters:
name - the name
colunmName - the column name
clazz - the clazz
Method Detail

parseValue

public Criteria[] parseValue(String value)
Description copied from class: Criteria
Creates a copy of the given Criteria populated with the parsed value or throws an exception.

Specified by:
parseValue in class Criteria
Parameters:
value - the attribute
Returns:
the criteria[]

getValue

public Object getValue()
Description copied from class: Criteria
Returns a value of the Criteria that in suitable SQL type.

Specified by:
getValue in class Criteria
Returns:
the value

getFilterClause

public StringBuilder getFilterClause()
Description copied from class: Criteria
Returns something like (COLUMN = :name).

Specified by:
getFilterClause in class Criteria
Returns:
the filter clause


Copyright © 2011–2013 Talend Inc.. All rights reserved.