Omlouvam se za rtfm dotaz. Samozrejme ze to jde:
<component name="BinaryFilestoreObject"
class="my.BinaryFilestoreObject">
<property name="filestoreId" column="bfoFilestoreId"
type="int"/>
<property name="fileSize" column="bfoFileSize" type="long"/>
<property name="filePath" column="bfoFilePath" type="string"/>
</component>
Pekny den
Pet
Burdik Petr napsal(a):
Ahojte,
mam objekt, ve kterem je vlozeny jiny objekt. Nechce se mi pouzivat
one-to-one mapping. Rad bych to namapoval do jedne tabulky. Jde tam
hlavne o to, ze je stejny mechanismus prace s filestore v ruznych
objektech v systemu. Nechce se mi vyvadet veskere metody ven do
objektu UpdatingObject.
Takze mam tridu
UpdatingObject {
protected long upid = 0; // update id
protected IBinaryFilestoreObject bfo = new
BinaryFilestoreObject(); // binary filestore object
public void setUpid (long upid) { this.upid = upid; }
public long getUpid() { return this.upid; }
public void setBinaryFilestoreObject (IBinaryFilestoreObject bfo) {
this.bfo = bfo; }
public IBinaryFilestoreObject getBinaryFilestoreObject() { return
this.bfo; }
}
public interface IBinaryFilestoreObject {
public void setFilestoreId(int filestoreId);
public int getFilestoreId();
public void setSystemCast(String systemcast);
public String getSystemCast();
public void setFileName(String fileName);
public String getFileName();
public void setFilePath(String filePath);
public String getFilePath();
public void setFileSize(long fileSize);
public long getFileSize();
}
public class BinaryFilestoreObject implements IBinaryFilestoreObject {
protected int filestoreId = 0;
protected String systemcast = "";
protected String fileName = "";
protected String filePath = "";
protected long fileSize = 0;
public void setFilestoreId(int filestoreId) { this.filestoreId =
filestoreId; }
public int getFilestoreId() { return filestoreId; }
public void setSystemCast(String systemcast) { this.systemcast =
systemcast; }
public String getSystemCast() { return systemcast; }
public void setFileName(String fileName) { this.fileName = fileName; }
public String getFileName() { return fileName; }
public void setFilePath(String filePath) { this.filePath = filePath; }
public String getFilePath() { return filePath; }
public void setFileSize(long fileSize) { this.fileSize = fileSize; }
public long getFileSize() { return fileSize; }
}
Pekny den
Pet