Exemple #1
0
  public final void load(final LentilObject object, final String sfield, final Object value)
      throws LentilObjectNotFound {
    final LentilClass lclass = object.getLentilClass();
    final LentilField field = lclass.getField(sfield);

    if (field == null) throw new IllegalStateException();

    field.set(object, value);

    final StringBuilder builder = new StringBuilder();

    builder.append(lclass.getLoadSql());
    builder.append(" where ");
    builder.append(field.getColumn());
    builder.append(" = ");
    builder.append(field.getSqlLiteral(object));

    object.load(this, builder.toString());
  }
Exemple #2
0
 public final void load(final LentilObject object, final LentilCursor cursor) {
   object.load(cursor);
 }
Exemple #3
0
 public final void load(final LentilObject object, final Object key) throws LentilObjectNotFound {
   object.setKey(key);
   object.load(this, object.getLentilClass().getLoadSql(object));
 }
Exemple #4
0
 public final void setNewKey(final LentilObject object) {
   object.setNewKey(this);
 }
Exemple #5
0
 public final int delete(final LentilObject object) {
   return object.delete(this);
 }
Exemple #6
0
 public final int insert(final LentilObject object) {
   return object.insert(this);
 }
Exemple #7
0
 public final int update(final LentilObject object) {
   return object.update(this);
 }
Exemple #8
0
 public final void save(final LentilObject object) {
   object.save(this);
 }