111112113114115116117118119120121
} remove.append(model); } else { if (model.getInstanceName() == null) { m.create(model); } else { m.update(model); } } }
133134135136137138139140141142143
public static void saveItem(ItemModel model) throws Exception { DatabaseTableMapping m = JdbcConnectionHandler.instance().getDatabaseTableMapping(ItemModel.class.getName()); if (model.getInstanceName() == null) { m.create(model); } else { m.update(model); } }
126127128129130131132133134135136
public void create(DataModel model) { DatabaseTableMapping mapping = JdbcConnectionHandler.instance().getDatabaseTableMapping(model.getClass().getName()); try { mapping.create(model); } catch (Exception e) { e.printStackTrace(); //TODO } }