log4j.debug("InitialClientSetup - createClient - m_info: " + m_info.toString());
// Add images
Client newClient = OBDal.getInstance().get(Client.class, AD_Client_ID);
SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
if (sys.getYourCompanyBigImage() != null) {
Image yourCompanyBigImage = OBProvider.getInstance().get(Image.class);
yourCompanyBigImage.setClient(newClient);
yourCompanyBigImage.setBindaryData(sys.getYourCompanyBigImage().getBindaryData());
yourCompanyBigImage.setName(sys.getYourCompanyBigImage().getName());
newClient.getClientInformationList().get(0).setYourCompanyBigImage(yourCompanyBigImage);
OBDal.getInstance().save(yourCompanyBigImage);
}
if (sys.getYourCompanyDocumentImage() != null) {
Image yourCompanyDocumentImage = OBProvider.getInstance().get(Image.class);
yourCompanyDocumentImage.setClient(newClient);
yourCompanyDocumentImage.setBindaryData(sys.getYourCompanyDocumentImage().getBindaryData());
yourCompanyDocumentImage.setName(sys.getYourCompanyBigImage().getName());
newClient.getClientInformationList().get(0).setYourCompanyDocumentImage(
yourCompanyDocumentImage);
OBDal.getInstance().save(yourCompanyDocumentImage);
}
if (sys.getYourCompanyMenuImage() != null) {
Image yourCompanyMenuImage = OBProvider.getInstance().get(Image.class);
yourCompanyMenuImage.setClient(newClient);
yourCompanyMenuImage.setBindaryData(sys.getYourCompanyMenuImage().getBindaryData());
yourCompanyMenuImage.setName(sys.getYourCompanyMenuImage().getName());
newClient.getClientInformationList().get(0).setYourCompanyMenuImage(yourCompanyMenuImage);
OBDal.getInstance().save(yourCompanyMenuImage);
}
OBDal.getInstance().save(newClient);