public static ExternalEntry createExternalEntry(String className, Object[] fieldsValues, ITypeDesc typeDesc) { ExternalEntry ee = new ExternalEntry(); ee.m_ClassName = className; ee.m_FieldsValues = fieldsValues; updateProperties(ee, typeDesc); return ee; }
private Object getDefaultTemplate(String destName) { if (_defaultTemplate == null || !_defaultTemplate.m_ClassName.equalsIgnoreCase(destName)) { _defaultTemplate = new ExternalEntry(destName, new Object[17], FIELDS_NAMES, FIELDS_TYPES); _defaultTemplate.setFifo(true); } return _defaultTemplate; }
@Override public Object toObject(EntryType entryType, StorageTypeDeserialization storageTypeDeserialization) { if (!isReturnOnlyUids()) throw new InternalSpaceException("toObject() is not supported in query packets when isReturnOnlyUids() is false."); if (getMultipleUIDs() != null) return new ExternalEntry(getMultipleUIDs()); return new ExternalEntry(getUID()); }
@Override public Object toObject(EntryType entryType, StorageTypeDeserialization storageTypeDeserialization) { try { if (_typeDesc != null) return super.toObject(entryType, storageTypeDeserialization); if (getMultipleUIDs() != null) return new ExternalEntry(getMultipleUIDs()); return new ExternalEntry(getUID()); } catch (Exception e) { throw new ConversionException(e); } }
@SuppressWarnings("deprecation") private static void writePbsObject(PbsOutputStream output, Object value) { // Get type info: SpaceTypeInfo typeInfo = SpaceTypeInfoRepository.getGlobalRepository().getByType(value.getClass()); // Extract properties values: int length = typeInfo.getNumOfSpaceProperties(); Object[] values = new Object[length]; for (int i = 0; i < length; i++) { SpacePropertyInfo propertyInfo = typeInfo.getProperty(i); Object propertyValue = propertyInfo.getValue(value); values[i] = propertyInfo.convertToNullIfNeeded(propertyValue); } // Create ExternalEntry: ExternalEntry entry = new ExternalEntry(typeInfo.getName(), values); // Now call back in to caller as we are at a new level. writeExternalEntry(output, entry); }
ExternalEntry template = new ExternalEntry(tableName, null, null); template.setFieldsNames(_columnNames); template.setFieldsTypes(_columnTypes);
ExternalEntry entry = new ExternalEntry(getTableName(), literalValues, columnNames); entry.m_FieldsTypes = types; if (myUid != null) ExternalEntry newEntry = new ExternalEntry(getTableName(), innerResult.getFieldValues(i + 1), columnNames);
entriesToWrite[batchIndex] = new ExternalEntry(getTableName(), literalValues, columnNames); entriesToWrite[batchIndex].m_FieldsTypes = types; if (myUid != null)
ExternalEntry template = new ExternalEntry(object.getEntryUID()); ExternalEntry entry = (ExternalEntry) space.read(template, null,