69 lines
1.6 KiB
Java
69 lines
1.6 KiB
Java
package org.warp.jcwdb.ann.exampleimpl;
|
|
|
|
import org.warp.jcwdb.ann.*;
|
|
|
|
import java.io.IOException;
|
|
import java.util.StringJoiner;
|
|
|
|
public class Class1 extends DBObject {
|
|
|
|
public Class1(JCWDatabase database) {
|
|
super(database);
|
|
}
|
|
|
|
public Class1(JCWDatabase database, DBObjectIndicesManager.DBObjectInfo objectInfo) throws IOException {
|
|
super(database, objectInfo);
|
|
}
|
|
|
|
@DBField(id = 0, type = DBDataType.OBJECT)
|
|
public String value1;
|
|
|
|
@DBField(id = 1, type = DBDataType.INTEGER)
|
|
public int value2;
|
|
|
|
@DBField(id = 2, type = DBDataType.INTEGER)
|
|
public int value3;
|
|
|
|
@DBPropertyGetter(id = 0, type = DBDataType.OBJECT)
|
|
public String getValue3() {
|
|
return getProperty();
|
|
}
|
|
|
|
@DBPropertySetter(id = 0, type = DBDataType.OBJECT)
|
|
public void setValue3(String value) {
|
|
setProperty(value);
|
|
}
|
|
|
|
@DBPropertyGetter(id = 1, type = DBDataType.DATABASE_OBJECT)
|
|
public Class1 getValue4() {
|
|
return getProperty();
|
|
}
|
|
|
|
@DBPropertySetter(id = 1, type = DBDataType.DATABASE_OBJECT)
|
|
public void setValue4(Class1 value) {
|
|
setProperty(value);
|
|
}
|
|
|
|
@DBPropertyGetter(id = 2, type = DBDataType.OBJECT)
|
|
public String getValueStr() {
|
|
return getProperty();
|
|
}
|
|
|
|
@DBPropertySetter(id = 2, type = DBDataType.OBJECT)
|
|
public void setValueStr(String value) {
|
|
setProperty(value);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return new StringJoiner(", ", Class1.class.getSimpleName() + "[", "]")
|
|
.add("value1='" + value1 + "'")
|
|
.add("value2=" + value2)
|
|
.add("value3=" + value3)
|
|
.add("getValue3=" + getValue3())
|
|
.add("getValue4=" + getValue4())
|
|
.add("getValueStr=" + getValueStr())
|
|
.toString();
|
|
}
|
|
}
|