I want try to make hibernate save my object but with wrappered data type, not general data tipe like int, String etc. Example, like class Contact below:
public class Contact {
private StringWrapper firstName;
private StringWrapper lastName;
private StringWrapper email;
private IntegerWrapper id;
public StringWrapper getEmail() {
return email;
}
public StringWrapper getFirstName() {
return firstName;
}
public StringWrapper getLastName() {
return lastName;
}
public void setEmail(StringWrapper StringWrapper) {
email = StringWrapper;
}
public void setFirstName(StringWrapper StringWrapper) {
firstName = StringWrapper;
}
public void setLastName(StringWrapper StringWrapper) {
lastName = StringWrapper;
}
public IntegerWrapper getId() {
return id;
}
public void setId(IntegerWrapper i) {
id = i;
}
}
I have value in that class that saved in StringWrapper and IntegerWrapper object. I must use getString() method in StringWrapper and getInteger() in IntegerWrapper to get actual value.
Is posible for me, to save object with hibernate, but the values that want to save can get with call getString() and getInteger() method before? Because, if i force to save with hibernate i will get message "Could not determine type for: StringWrapper, at table contact for columns ......"
Thanks,