/** * * @param oid * @return */ public BindEntry getTableBinding(OID oid, boolean isRowEntry) { Set<Entry<OID,BindEntry>> entries = null; // if(isRowEntry) { // entries = tableRowEntryMappings.entrySet(); // } else { entries = tableMappings.entrySet(); // } for (Entry<OID,BindEntry> entry : entries) { if (oid.startsWith(entry.getKey())) { BindEntry value = entry.getValue(); BindEntry bindEntry = (BindEntry) value.clone(); int[] oidValue = oid.getValue(); int[] subOid = new int[oid.size() - entry.getKey().size()]; System.arraycopy(oidValue, entry.getKey().size(), subOid, 0, oid.size() - entry.getKey().size()); if(subOid.length > 0) { bindEntry.setTableIndexOID(new OID(subOid)); } return bindEntry; } } return null; }
/** * * @param oid * @return */ public BindEntry getTableBinding(OID oid, boolean isRowEntry) { Set<Entry<OID,BindEntry>> entries = null; // if(isRowEntry) { // entries = tableRowEntryMappings.entrySet(); // } else { entries = tableMappings.entrySet(); // } for (Entry<OID,BindEntry> entry : entries) { if (oid.startsWith(entry.getKey())) { BindEntry value = entry.getValue(); BindEntry bindEntry = (BindEntry) value.clone(); int[] oidValue = oid.getValue(); int[] subOid = new int[oid.size() - entry.getKey().size()]; System.arraycopy(oidValue, entry.getKey().size(), subOid, 0, oid.size() - entry.getKey().size()); if(subOid.length > 0) { bindEntry.setTableIndexOID(new OID(subOid)); } return bindEntry; } } return null; }