1 19 20 package org.apache.cayenne.access.types; 21 22 import java.sql.CallableStatement ; 23 import java.sql.PreparedStatement ; 24 import java.sql.ResultSet ; 25 26 import org.apache.cayenne.map.DbAttribute; 27 import org.apache.cayenne.validation.ValidationResult; 28 29 36 class VoidType implements ExtendedType { 37 38 public String getClassName() { 39 return Void.TYPE.getName(); 40 } 41 42 45 public boolean validateProperty( 46 Object source, 47 String property, 48 Object value, 49 DbAttribute dbAttribute, 50 ValidationResult validationResult) { 51 return true; 52 } 53 54 public void setJdbcObject( 55 PreparedStatement statement, 56 Object value, 57 int pos, 58 int type, 59 int precision) throws Exception { 60 statement.setNull(pos, type); 61 } 62 63 public Object materializeObject(ResultSet rs, int index, int type) throws Exception { 64 return null; 65 } 66 67 public Object materializeObject(CallableStatement rs, int index, int type) 68 throws Exception { 69 return null; 70 } 71 } 72 | Popular Tags |