List of usage examples for java.sql ResultSet CONCUR_READ_ONLY
int CONCUR_READ_ONLY
To view the source code for java.sql ResultSet CONCUR_READ_ONLY.
Click Source Link
ResultSet
object that may NOT be updated. From source file:edu.ku.brc.specify.conversion.AgentConverter.java
/** * @param cntSQL//from w w w .j av a 2 s . co m * @param sql * @param tableName * @param mapperName */ private void doAddressOfRecord(final String cntSQL, final String sql, final String tableName, final String mapperName) { IdMapperIFace agentMapper = IdMapperMgr.getInstance().get("agent_AgentID"); Session session = HibernateUtil.getNewSession(); Transaction trans = null; try { conv.setProcess(0, BasicSQLUtils.getCountAsInt(oldDBConn, cntSQL)); IdMapperIFace loanMapper = IdMapperMgr.getInstance().get(mapperName); Statement stmt = oldDBConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs = stmt.executeQuery(sql); int cnt = 0; while (rs.next()) { int col = 1; Integer loanID = rs.getInt(col++); Integer agentID = rs.getInt(col++); String address = rs.getString(col++); String city = rs.getString(col++); String state = rs.getString(col++); String country = rs.getString(col++); String postalCode = rs.getString(col++); String remarks = rs.getString(col++); Timestamp timestampModified = rs.getTimestamp(col++); Timestamp timestampCreated = rs.getTimestamp(col++); Integer newAgentId = agentMapper.get(agentID); if (newAgentId != null) { List<?> list = session.createQuery("FROM Agent WHERE id = " + newAgentId).list(); if (list != null && list.size() == 1) { Agent agent = (Agent) list.get(0); Integer newLoanId = loanMapper.get(loanID); if (newLoanId != null) { list = session.createQuery("FROM " + tableName + " WHERE id = " + newLoanId).list(); if (list != null && list.size() == 1) { trans = session.beginTransaction(); AddressOfRecord aor = new AddressOfRecord(); aor.initialize(); aor.setAddress(address); aor.setAgent(agent); aor.setCity(city); aor.setCountry(country); aor.setPostalCode(postalCode); aor.setRemarks(remarks); aor.setState(state); aor.setTimestampCreated(timestampCreated); aor.setTimestampModified(timestampModified); FormDataObjIFace parentObj = (FormDataObjIFace) list.get(0); DataModelObjBase.setDataMember(parentObj, "addressOfRecord", aor); session.saveOrUpdate(parentObj); //session.saveOrUpdate(aor); trans.commit(); } } } } if (cnt % 100 == 0) { conv.setProcess(0, cnt); } cnt++; } rs.close(); stmt.close(); } catch (Exception ex) { try { if (trans != null) trans.rollback(); } catch (Exception ex1) { } ex.printStackTrace(); log.error(ex); } finally { session.close(); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BoolDefTable.java
public MSSBamBoolDefBuff[] readBuffByPrevIdx(MSSBamAuthorization Authorization, Long PrevId) { final String S_ProcName = "readBuffByPrevIdx"; try {// w w w. j a v a2 s. c o m Connection cnx = schema.getCnx(); String sql = S_sqlSelectBoolDefBuff + "WHERE " + ((PrevId == null) ? "val.PrevId is null " : "val.PrevId = " + PrevId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBoolDefBuff> buffList = new ArrayList<MSSBamBoolDefBuff>(); while (resultSet.next()) { MSSBamBoolDefBuff buff = unpackBoolDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBoolDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BlobDefTable.java
public MSSBamBlobDefBuff[] readBuffByEAccFreqIdx(MSSBamAuthorization Authorization, Short EditAccessFrequencyId) { final String S_ProcName = "readBuffByEAccFreqIdx"; try {/*w w w . j a v a 2 s . c o m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectBlobDefBuff + "WHERE " + ((EditAccessFrequencyId == null) ? "val.EditAccessFrequencyId is null " : "val.EditAccessFrequencyId = " + EditAccessFrequencyId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBlobDefBuff> buffList = new ArrayList<MSSBamBlobDefBuff>(); while (resultSet.next()) { MSSBamBlobDefBuff buff = unpackBlobDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBlobDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AnyObjTable.java
public MSSBamAnyObjBuff[] readDerivedByTenantIdx(MSSBamAuthorization Authorization, long TenantId) { final String S_ProcName = "readDerivedByTenantIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w w w. java 2 s.com*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectAnyObjDistinctClassCode + "WHERE " + "anyo.TenantId = " + Long.toString(TenantId) + " "; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamAnyObjBuff> resultList = new ArrayList<MSSBamAnyObjBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("ANYO")) { MSSBamAnyObjBuff[] subList = readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SCP")) { MSSBamScopeBuff[] subList = schema.getTableScope().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DICT")) { MSSBamDictionaryBuff[] subList = schema.getTableDictionary().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("RMD")) { MSSBamMSSBamBuff[] subList = schema.getTableMSSBam().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BDM")) { MSSBamBaseDomainBuff[] subList = schema.getTableBaseDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DOM")) { MSSBamDomainBuff[] subList = schema.getTableDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("LENT")) { MSSBamLegalEntityBuff[] subList = schema.getTableLegalEntity().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("COM")) { MSSBamCompanyBuff[] subList = schema.getTableCompany().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("USR")) { MSSBamUserBuff[] subList = schema.getTableUser().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("PRJ")) { MSSBamProjectBuff[] subList = schema.getTableProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("VER")) { MSSBamVersionBuff[] subList = schema.getTableVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MJV")) { MSSBamMajorVersionBuff[] subList = schema.getTableMajorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MNV")) { MSSBamMinorVersionBuff[] subList = schema.getTableMinorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TLD")) { MSSBamTLDBuff[] subList = schema.getTableTLD().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("IDX")) { MSSBamIndexBuff[] subList = schema.getTableIndex().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("REL")) { MSSBamRelationBuff[] subList = schema.getTableRelation().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SCH")) { MSSBamSchemaDefBuff[] subList = schema.getTableSchemaDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TBL")) { MSSBamTableBuff[] subList = schema.getTableTable().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("VAL")) { MSSBamValueBuff[] subList = schema.getTableValue().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ATM")) { MSSBamAtomDefBuff[] subList = schema.getTableAtomDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BLB")) { MSSBamBlobDefBuff[] subList = schema.getTableBlobDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TBLB")) { MSSBamTableBlobBuff[] subList = schema.getTableTableBlob().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SBLB")) { MSSBamSchemaBlobBuff[] subList = schema.getTableSchemaBlob().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BLN")) { MSSBamBoolDefBuff[] subList = schema.getTableBoolDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TBLN")) { MSSBamTableBoolBuff[] subList = schema.getTableTableBool().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SBLN")) { MSSBamSchemaBoolBuff[] subList = schema.getTableSchemaBool().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DAT")) { MSSBamDateDefBuff[] subList = schema.getTableDateDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TDAT")) { MSSBamTableDateBuff[] subList = schema.getTableTableDate().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SDAT")) { MSSBamSchemaDateBuff[] subList = schema.getTableSchemaDate().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DBL")) { MSSBamDoubleDefBuff[] subList = schema.getTableDoubleDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TDBL")) { MSSBamTableDoubleBuff[] subList = schema.getTableTableDouble().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SDBL")) { MSSBamSchemaDoubleBuff[] subList = schema.getTableSchemaDouble().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("NUM")) { MSSBamNumberDefBuff[] subList = schema.getTableNumberDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNUM")) { MSSBamTableNumberBuff[] subList = schema.getTableTableNumber().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNUM")) { MSSBamSchemaNumberBuff[] subList = schema.getTableSchemaNumber().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("FLT")) { MSSBamFloatDefBuff[] subList = schema.getTableFloatDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TFLT")) { MSSBamTableFloatBuff[] subList = schema.getTableTableFloat().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SFLT")) { MSSBamSchemaFloatBuff[] subList = schema.getTableSchemaFloat().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("I16")) { MSSBamInt16DefBuff[] subList = schema.getTableInt16Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TI16")) { MSSBamTableInt16Buff[] subList = schema.getTableTableInt16().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SI16")) { MSSBamSchemaInt16Buff[] subList = schema.getTableSchemaInt16().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENM")) { MSSBamEnumDefBuff[] subList = schema.getTableEnumDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TENM")) { MSSBamTableEnumBuff[] subList = schema.getTableTableEnum().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SENM")) { MSSBamSchemaEnumBuff[] subList = schema.getTableSchemaEnum().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("G16")) { MSSBamId16GenDefBuff[] subList = schema.getTableId16GenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TG16")) { MSSBamTableId16GenBuff[] subList = schema.getTableTableId16Gen().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SG16")) { MSSBamSchemaId16GenBuff[] subList = schema.getTableSchemaId16Gen() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("U16")) { MSSBamUInt16DefBuff[] subList = schema.getTableUInt16Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TU16")) { MSSBamTableUInt16Buff[] subList = schema.getTableTableUInt16().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SU16")) { MSSBamSchemaUInt16Buff[] subList = schema.getTableSchemaUInt16().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("I32")) { MSSBamInt32DefBuff[] subList = schema.getTableInt32Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TI32")) { MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SI32")) { MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("G32")) { MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TG32")) { MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SG32")) { MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("U32")) { MSSBamUInt32DefBuff[] subList = schema.getTableUInt32Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TU32")) { MSSBamTableUInt32Buff[] subList = schema.getTableTableUInt32().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SU32")) { MSSBamSchemaUInt32Buff[] subList = schema.getTableSchemaUInt32().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("I64")) { MSSBamInt64DefBuff[] subList = schema.getTableInt64Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TI64")) { MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SI64")) { MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("G64")) { MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TG64")) { MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SG64")) { MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("U64")) { MSSBamUInt64DefBuff[] subList = schema.getTableUInt64Def().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TU64")) { MSSBamTableUInt64Buff[] subList = schema.getTableTableUInt64().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SU64")) { MSSBamSchemaUInt64Buff[] subList = schema.getTableSchemaUInt64().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("UUID")) { MSSBamUuidDefBuff[] subList = schema.getTableUuidDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TUUI")) { MSSBamTableUuidBuff[] subList = schema.getTableTableUuid().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SUUI")) { MSSBamSchemaUuidBuff[] subList = schema.getTableSchemaUuid().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("IDGU")) { MSSBamUuidGenDefBuff[] subList = schema.getTableUuidGenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TGUU")) { MSSBamTableUuidGenBuff[] subList = schema.getTableTableUuidGen().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SGUU")) { MSSBamSchemaUuidGenBuff[] subList = schema.getTableSchemaUuidGen() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("NMT")) { MSSBamNmTokenDefBuff[] subList = schema.getTableNmTokenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNTK")) { MSSBamTableNmTokenBuff[] subList = schema.getTableTableNmToken().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNTK")) { MSSBamSchemaNmTokenBuff[] subList = schema.getTableSchemaNmToken() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("NMS")) { MSSBamNmTokensDefBuff[] subList = schema.getTableNmTokensDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNTS")) { MSSBamTableNmTokensBuff[] subList = schema.getTableTableNmTokens() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNTS")) { MSSBamSchemaNmTokensBuff[] subList = schema.getTableSchemaNmTokens() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STR")) { MSSBamStringDefBuff[] subList = schema.getTableStringDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TSTR")) { MSSBamTableStringBuff[] subList = schema.getTableTableString().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SSTR")) { MSSBamSchemaStringBuff[] subList = schema.getTableSchemaString().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ZDY")) { MSSBamTZDateDefBuff[] subList = schema.getTableTZDateDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TZDY")) { MSSBamTableTZDateBuff[] subList = schema.getTableTableTZDate().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SZDY")) { MSSBamSchemaTZDateBuff[] subList = schema.getTableSchemaTZDate().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ZTM")) { MSSBamTZTimeDefBuff[] subList = schema.getTableTZTimeDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TZTM")) { MSSBamTableTZTimeBuff[] subList = schema.getTableTableTZTime().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SZTM")) { MSSBamSchemaTZTimeBuff[] subList = schema.getTableSchemaTZTime().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ZSP")) { MSSBamTZTimestampDefBuff[] subList = schema.getTableTZTimestampDef() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TZST")) { MSSBamTableTZTimestampBuff[] subList = schema.getTableTableTZTimestamp() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SZST")) { MSSBamSchemaTZTimestampBuff[] subList = schema.getTableSchemaTZTimestamp() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TXT")) { MSSBamTextDefBuff[] subList = schema.getTableTextDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTXT")) { MSSBamTableTextBuff[] subList = schema.getTableTableText().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STXT")) { MSSBamSchemaTextBuff[] subList = schema.getTableSchemaText().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TIM")) { MSSBamTimeDefBuff[] subList = schema.getTableTimeDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTIM")) { MSSBamTableTimeBuff[] subList = schema.getTableTableTime().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STIM")) { MSSBamSchemaTimeBuff[] subList = schema.getTableSchemaTime().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TSP")) { MSSBamTimestampDefBuff[] subList = schema.getTableTimestampDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTSM")) { MSSBamTableTimestampBuff[] subList = schema.getTableTableTimestamp() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STSM")) { MSSBamSchemaTimestampBuff[] subList = schema.getTableSchemaTimestamp() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TKN")) { MSSBamTokenDefBuff[] subList = schema.getTableTokenDef().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTOK")) { MSSBamTableTokenBuff[] subList = schema.getTableTableToken().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STOK")) { MSSBamSchemaTokenBuff[] subList = schema.getTableSchemaToken().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TBC")) { MSSBamTableColBuff[] subList = schema.getTableTableCol().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("LIC")) { MSSBamLicenseBuff[] subList = schema.getTableLicense().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CHN")) { MSSBamChainBuff[] subList = schema.getTableChain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("RLC")) { MSSBamRelationColBuff[] subList = schema.getTableRelationCol().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ETG")) { MSSBamEnumTagBuff[] subList = schema.getTableEnumTag().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("IXC")) { MSSBamIndexColBuff[] subList = schema.getTableIndexCol().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } return (resultList.toArray(new MSSBamAnyObjBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BoolDefTable.java
public MSSBamBoolDefBuff[] readBuffByNextIdx(MSSBamAuthorization Authorization, Long NextId) { final String S_ProcName = "readBuffByNextIdx"; try {//from ww w . j a v a 2 s . c om Connection cnx = schema.getCnx(); String sql = S_sqlSelectBoolDefBuff + "WHERE " + ((NextId == null) ? "val.NextId is null " : "val.NextId = " + NextId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBoolDefBuff> buffList = new ArrayList<MSSBamBoolDefBuff>(); while (resultSet.next()) { MSSBamBoolDefBuff buff = unpackBoolDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBoolDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BlobDefTable.java
public MSSBamBlobDefBuff[] readBuffByPrevIdx(MSSBamAuthorization Authorization, Long PrevId) { final String S_ProcName = "readBuffByPrevIdx"; try {/*from w w w .j a va 2 s . c o m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectBlobDefBuff + "WHERE " + ((PrevId == null) ? "val.PrevId is null " : "val.PrevId = " + PrevId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBlobDefBuff> buffList = new ArrayList<MSSBamBlobDefBuff>(); while (resultSet.next()) { MSSBamBlobDefBuff buff = unpackBlobDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBlobDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BlobDefTable.java
public MSSBamBlobDefBuff[] readBuffByNextIdx(MSSBamAuthorization Authorization, Long NextId) { final String S_ProcName = "readBuffByNextIdx"; try {//from www.j a v a 2 s.com Connection cnx = schema.getCnx(); String sql = S_sqlSelectBlobDefBuff + "WHERE " + ((NextId == null) ? "val.NextId is null " : "val.NextId = " + NextId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBlobDefBuff> buffList = new ArrayList<MSSBamBlobDefBuff>(); while (resultSet.next()) { MSSBamBlobDefBuff buff = unpackBlobDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBlobDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BoolDefTable.java
public MSSBamBoolDefBuff[] readBuffByContPrevIdx(MSSBamAuthorization Authorization, long ValueContainerId, Long PrevId) {//from w ww . j a v a 2s.co m final String S_ProcName = "readBuffByContPrevIdx"; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectBoolDefBuff + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "AND " + ((PrevId == null) ? "val.PrevId is null " : "val.PrevId = " + PrevId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBoolDefBuff> buffList = new ArrayList<MSSBamBoolDefBuff>(); while (resultSet.next()) { MSSBamBoolDefBuff buff = unpackBoolDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBoolDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BlobDefTable.java
public MSSBamBlobDefBuff[] readBuffByContPrevIdx(MSSBamAuthorization Authorization, long ValueContainerId, Long PrevId) {//from ww w . j a v a2s. c o m final String S_ProcName = "readBuffByContPrevIdx"; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectBlobDefBuff + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "AND " + ((PrevId == null) ? "val.PrevId is null " : "val.PrevId = " + PrevId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBlobDefBuff> buffList = new ArrayList<MSSBamBlobDefBuff>(); while (resultSet.next()) { MSSBamBlobDefBuff buff = unpackBlobDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBlobDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BoolDefTable.java
public MSSBamBoolDefBuff[] readBuffByContNextIdx(MSSBamAuthorization Authorization, long ValueContainerId, Long NextId) {//from www .j a v a 2s.com final String S_ProcName = "readBuffByContNextIdx"; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectBoolDefBuff + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "AND " + ((NextId == null) ? "val.NextId is null " : "val.NextId = " + NextId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamBoolDefBuff> buffList = new ArrayList<MSSBamBoolDefBuff>(); while (resultSet.next()) { MSSBamBoolDefBuff buff = unpackBoolDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamBoolDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }