MentaBean

Compare Revisions

Ignore whitespace Rev 218 → Rev 219

/trunk/src/test/java/org/mentabean/jdbc/AnsiSQLBeanSessionTest.java
41,6 → 41,7
import org.mentabean.util.SQLBuilder;
import org.mentabean.util.SQLUtils;
 
@SuppressWarnings("unused")
public class AnsiSQLBeanSessionTest extends AbstractBeanSessionTest {
 
private static final SimpleDateFormat BD_FORMATTER = new SimpleDateFormat("yyyy-MM-dd");
/trunk/src/main/java/org/mentabean/type/EnumValueType.java
76,6 → 76,7
return this.getClass().getSimpleName() + ": " + enumType.getSimpleName();
}
 
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Enum<?> getFromResultSet(final ResultSet rset, final int index) throws SQLException {
 
89,6 → 90,7
 
}
 
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Enum<?> getFromResultSet(final ResultSet rset, final String field) throws SQLException {
 
/trunk/src/main/java/org/mentabean/jdbc/AnsiSQLBeanSession.java
60,6 → 60,7
*
* @author soliveira
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class AnsiSQLBeanSession implements BeanSession {
 
protected static boolean DEBUG = false;
2524,13 → 2525,13
}
 
private int getSize(DBType<?> dbType) {
if (dbType instanceof SizedType) {
SizedType st = (SizedType) dbType;
return st.getSize();
}
throw new IllegalStateException("Cannot get size from type: " + dbType);
}
// private int getSize(DBType<?> dbType) {
// if (dbType instanceof SizedType) {
// SizedType st = (SizedType) dbType;
// return st.getSize();
// }
// throw new IllegalStateException("Cannot get size from type: " + dbType);
// }
public BeanConfig getConfigFor(Class<? extends Object> clazz) {
return beanManager.getBeanConfig(clazz);
/trunk/src/main/java/org/mentabean/BeanException.java
24,6 → 24,8
*/
public class BeanException extends RuntimeException {
 
private static final long serialVersionUID = -6402197033079197979L;
protected final Throwable rootCause;
 
public BeanException() {
/trunk/src/main/java/org/mentabean/DBField.java
74,6 → 74,7
 
}
 
@SuppressWarnings("rawtypes")
public DBType getType() {
 
return type;
/trunk/src/main/java/org/mentabean/DBTypes.java
68,6 → 68,7
public static ByteArrayType BYTE_ARRAY = new ByteArrayType();
public static GenericType GENERIC = new GenericType();
 
@SuppressWarnings("unchecked")
public static DBType<?> from(Class<? extends Object> klass) {
if (klass.isInterface()) {
return null;
/trunk/src/main/java/org/mentabean/BeanConfig.java
231,7 → 231,7
return field((Object) null, type);
}
return addField(name, name, type, false);
return addField(name, name.replace(".", "_"), type, false);
}
public BeanConfig field(Object propValueFromGetter, final DBType<? extends Object> type) {
279,7 → 279,7
return pk((Object) null, type);
}
 
return addField(name, name, type, true);
return addField(name, name.replace(".", "_"), type, true);
}
public BeanConfig pk(Object propValueFromGetter, final DBType<? extends Object> type) {
/trunk/src/main/java/org/mentabean/util/InjectionUtils.java
26,6 → 26,7
import java.util.List;
import java.util.Map;
 
@SuppressWarnings({"unchecked", "rawtypes"})
public class InjectionUtils {
 
/**
/trunk/pom.xml
62,12 → 62,6
</dependency>
 
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
 
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>