public Map<?, ?> getContentAsMap(Type target) { return getContentAsMap(target, null); }
public ExternalizablePersistentMap(Map<?, ?> content, boolean initialized, boolean dirty) { super(null, initialized, dirty); setContentFromMap(content); }
value = new ExternalizablePersistentMap((Map<?, ?>)null, false, false); value = new ExternalizablePersistentMap((Map<?, ?>)null, true, false); ((ExternalizablePersistentMap)value).setContentFromMap((Map<?, ?>)value);
protected AbstractExternalizablePersistentCollection newExternalizableCollection(PersistentCollection value) { final boolean initialized = Hibernate.isInitialized(value); final boolean dirty = value.isDirty(); AbstractExternalizablePersistentCollection coll = null; if (value instanceof PersistentSet) coll = new ExternalizablePersistentSet(initialized ? (Set<?>)value : null, initialized, dirty); else if (value instanceof PersistentList) coll = new ExternalizablePersistentList(initialized ? (List<?>)value : null, initialized, dirty); else if (value instanceof PersistentBag) coll = new ExternalizablePersistentBag(initialized ? (List<?>)value : null, initialized, dirty); else if (value instanceof PersistentMap) coll = new ExternalizablePersistentMap(initialized ? (Map<?, ?>)value : null, initialized, dirty); else throw new UnsupportedOperationException("Unsupported Hibernate collection type: " + value); if (serializeMetadata != SerializeMetadata.NO && (serializeMetadata == SerializeMetadata.YES || !initialized) && value.getRole() != null) { char[] hexKey = StringUtil.bytesToHexChars(serializeSerializable(value.getKey())); char[] hexSnapshot = StringUtil.bytesToHexChars(serializeSerializable(value.getStoredSnapshot())); String metadata = new StringBuilder(hexKey.length + 1 + hexSnapshot.length + 1 + value.getRole().length()) .append(hexKey).append(':') .append(hexSnapshot).append(':') .append(value.getRole()) .toString(); coll.setMetadata(metadata); } return coll; }
public Map<?, ?> getContentAsMap(Type target) { return getContentAsMap(target, null); }
public ExternalizablePersistentMap(Map<?, ?> content, boolean initialized, boolean dirty) { super(null, initialized, dirty); setContentFromMap(content); }
public Map<?, ?> getContentAsMap(Type target) { return getContentAsMap(target, null); }
public ExternalizablePersistentMap(Map<?, ?> content, boolean initialized, boolean dirty) { super(null, initialized, dirty); setContentFromMap(content); }
if (initialized) { if (content != null) coll = ((ExternalizablePersistentMap)value).getContentAsMap(target);
Map<?, ?> map = ((ExternalizablePersistentMap)value).getContentAsMap(target, comparator); coll = (sorted ? new PersistentSortedMap(null, (SortedMap<?, ?>)map) : new PersistentMap(null, map));