/** @inheritdoc */ @Override public String getKey(Customer entity) { if (entity != null) { return entity.getCustomerID(); } else { return null; } }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, Customer entity) { stmt.clearBindings(); String CustomerID = entity.getCustomerID(); if (CustomerID != null) { stmt.bindString(1, CustomerID); } String ContactName = entity.getContactName(); if (ContactName != null) { stmt.bindString(2, ContactName); } String ContactTitle = entity.getContactTitle(); if (ContactTitle != null) { stmt.bindString(3, ContactTitle); } String phone = entity.getPhone(); if (phone != null) { stmt.bindString(4, phone); } String CompanyName = entity.getCompanyName(); if (CompanyName != null) { stmt.bindString(5, CompanyName); } String Region = entity.getRegion(); if (Region != null) { stmt.bindString(6, Region); } String Fax = entity.getFax(); if (Fax != null) { stmt.bindString(7, Fax); } String Address = entity.getAddress(); if (Address != null) { stmt.bindString(8, Address); } String Country = entity.getCountry(); if (Country != null) { stmt.bindString(9, Country); } String City = entity.getCity(); if (City != null) { stmt.bindString(10, City); } String PostalCode = entity.getPostalCode(); if (PostalCode != null) { stmt.bindString(11, PostalCode); } }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, Customer entity, int offset) { entity.setCustomerID(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setContactName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setContactTitle(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setPhone(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setCompanyName(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setRegion(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setFax(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setAddress(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); entity.setCountry(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setCity(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setPostalCode(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); }
/** @inheritdoc */ @Override protected String updateKeyAfterInsert(Customer entity, long rowId) { return entity.getCustomerID(); }
@Override protected void attachEntity(Customer entity) { super.attachEntity(entity); entity.__setDaoSession(daoSession); }