Package jodd.db.oom

Examples of jodd.db.oom.DbEntityDescriptor


      if (object == null) {
        continue;
      }

      DbEntityDescriptor ded = cachedDbEntityDescriptors[i];

      if (ded == null) {  // not a type, continue
        continue;
      }

      // calculate key
      Object key;
      if (ded.hasIdColumn()) {
        //noinspection unchecked
        key = ded.getKeyValue(object);
      } else {
        key = object;
      }

      Object cachedObject = entitiesCache.get(key);
View Full Code Here


  public synchronized long nextId(Class entityType) {
    MutableLong lastId = entityIdsMap.get(entityType);
    if (lastId == null) {
      DbOomManager dbOomManager = DbOomManager.getInstance();

      DbEntityDescriptor ded = dbOomManager.lookupType(entityType);
      String tableName = ded.getTableName();
      String idColumn = ded.getIdColumnName();

      DbOomQuery dbOomQuery = query("select max(" + idColumn + ") from " + tableName);

      long lastLong = dbOomQuery.autoClose().executeCount();
View Full Code Here

  @Override
  public void process(StringBuilder out) {
    if (objectRef != null) {
      data = templateData.lookupObject(objectRef);
    }
    DbEntityDescriptor ded = lookupTableRef(tableRef);
    String table = resolveTable(tableRef, ded);
    DbEntityColumnDescriptor[] decList = ded.getColumnDescriptors();
    String typeName = StringUtil.uncapitalize(ded.getEntityName());

    int count = 0;
    out.append('(');
    for (DbEntityColumnDescriptor dec : decList) {
      if ((includeColumns == COLS_ONLY_IDS) && (dec.isId() == false)) {
View Full Code Here

  public void process(StringBuilder out) {
    if (isPreviousChunkOfType(CHUNK_TABLE)) {
      appendMissingSpace(out);
    }

    DbEntityDescriptor ded = tableRef != null ?
        lookupTableRef(tableRef) :
        lookupType(resolveClass(data));

    out.append(SET);

    DbEntityColumnDescriptor[] decList = ded.getColumnDescriptors();
    String typeName = StringUtil.uncapitalize(ded.getEntityName());
    //String table = resolveTable(tableRef, ded);

    int size = 0;
    for (DbEntityColumnDescriptor dec : decList) {
      String property = dec.getPropertyName();
View Full Code Here

TOP

Related Classes of jodd.db.oom.DbEntityDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.