#791043 : added PropertyType.STRING and PropertyType.NUMERIC

This commit is contained in:
Timo Westkämper 2011-07-01 13:44:59 +00:00
parent ab85349f6c
commit 5a6e432509
2 changed files with 48 additions and 6 deletions

View File

@ -0,0 +1,25 @@
package com.mysema.query.domain;
import org.junit.Ignore;
import org.junit.Test;
import com.mysema.query.annotations.PropertyType;
import com.mysema.query.annotations.QueryEntity;
import com.mysema.query.annotations.QueryType;
@Ignore
public class PropertyTypeTest {
@QueryEntity
public class Entity {
@QueryType(PropertyType.STRING)
Integer numberAsString;
}
@Test
public void NumberAsString_Like(){
QPropertyTypeTest_Entity.entity.numberAsString.like("a");
}
}

View File

@ -18,32 +18,49 @@ import com.mysema.codegen.model.TypeCategory;
public enum PropertyType {
/**
*
*/
COMPARABLE(TypeCategory.COMPARABLE),
*/
COMPARABLE(TypeCategory.COMPARABLE),
/**
*
*/
*/
ENUM(TypeCategory.ENUM),
/**
*
*/
*/
DATE(TypeCategory.DATE),
/**
*
*/
*/
DATETIME(TypeCategory.DATETIME),
/**
*
*/
*/
NONE(null),
/**
*
*/
NUMERIC(TypeCategory.NUMERIC),
/**
*
*/
SIMPLE(TypeCategory.SIMPLE),
/**
*
*/
STRING(TypeCategory.STRING),
/**
*
*/
TIME(TypeCategory.TIME),
/**
*
*/