public PojoWithJBossExternalize(int age, String key) { this.pojo = new PojoWithAttributes(age, key); }
@Override public int hashCode() { return pojo != null ? pojo.hashCode() : 0; }
@Override public void writeExternal(Object subject, ObjectOutput output) throws IOException { PojoWithAttributes.writeObject(output, ((PojoWithJBossExternalize) subject).pojo); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PojoWithSerializeWith that = (PojoWithSerializeWith) o; return !(pojo != null ? !pojo.equals(that.pojo) : that.pojo != null); }
@Override public PojoWithSerializeWith readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new PojoWithSerializeWith(PojoWithAttributes.readObject(input)); } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PojoWithJBossExternalize that = (PojoWithJBossExternalize) o; if (pojo != null ? !pojo.equals(that.pojo) : that.pojo != null) return false; return true; }
@Override public Object createExternal(Class<?> subjectType, ObjectInput input) throws IOException, ClassNotFoundException { return new PojoWithJBossExternalize(PojoWithAttributes.readObject(input)); } }
public PojoWithSerializeWith(int age, String key) { this.pojo = new PojoWithAttributes(age, key); }
@Override public void writeObject(ObjectOutput output, PojoWithSerializeWith object) throws IOException { PojoWithAttributes.writeObject(output, object.pojo); }
@Override public int hashCode() { return pojo != null ? pojo.hashCode() : 0; }
static PojoWithAttributes readObject(ObjectInput input) throws IOException, ClassNotFoundException { int age = input.readInt(); CacheEntry entry = (CacheEntry) input.readObject(); Key key = (Key) input.readObject(); UUID uuid = (UUID) input.readObject(); return new PojoWithAttributes(age, entry, key, uuid); }