@Override public void insert(Logo entity) { if (entity.getId() == null) { // TODO get new id from sequence entity.setId(LogoDao.getInternalId(entity.getPosition())); } super.insert(entity); }
@Override protected void fromObject(Logo l, StoreQuery<?> q) { // TODO fix it // q.addValue(OFC_LOGO.ID, l.getId()); q.addValue(OFC_LOGO.POS, l.getId()); // q.addValue(OFC_LOGO.POSITION, l.getPosition().name()); q.addValue(OFC_LOGO.IMAGE, l.getImage()); // q.addValue(OFC_LOGO.CONTENT_TYPE, l.getContentType()); }
@Override protected Integer getId(Logo l) { return l.getId(); }