Search in sources :

Example 1 with InsertByChainPItem

use of org.nutz.dao.impl.sql.pojo.InsertByChainPItem in project nutz by nutzam.

the class EntityOperator method addInsertSelfOnly.

public Pojo addInsertSelfOnly(Entity<?> en, Object obj) {
    if (null == en)
        return null;
    Pojo pojo;
    if (obj instanceof Chain) {
        pojo = dao.pojoMaker.makePojo(SqlType.INSERT);
        pojo.append(Pojos.Items.entityTableName());
        pojo.append(new InsertByChainPItem((Chain) obj));
        pojo.setEntity(en);
    } else {
        pojo = dao.pojoMaker.makeInsert(en).setOperatingObject(obj);
    }
    pojoList.add(pojo);
    return pojo;
}
Also used : Chain(org.nutz.dao.Chain) Pojo(org.nutz.dao.sql.Pojo) InsertByChainPItem(org.nutz.dao.impl.sql.pojo.InsertByChainPItem)

Aggregations

Chain (org.nutz.dao.Chain)1 InsertByChainPItem (org.nutz.dao.impl.sql.pojo.InsertByChainPItem)1 Pojo (org.nutz.dao.sql.Pojo)1