/** * Returns the key Object for the given item. * * @param item an item of type P */ public Object getKey(P item) { return item == null ? null : item.stableId(); } }
/** * Returns an unpopulated copy of the changed proxy — all properties are * undefined except its id. * * @return an instance of {@link EntityProxyId}<P> */ @SuppressWarnings("unchecked") public EntityProxyId<P> getProxyId() { return (EntityProxyId<P>) proxy.stableId(); }
public EntityProxyId<?> getProxyId() { return v.getRootBean() instanceof EntityProxy ? ((EntityProxy) v.getRootBean()) .stableId() : null; } });
public Object key(Object object) { if (object instanceof EntityProxy) { return ((EntityProxy) object).stableId(); } else if (object instanceof ValueProxy) { AutoBean<?> bean = AutoBeanUtils.getAutoBean(object); // Possibly replace an editable ValueProxy with its immutable base AutoBean<?> parent = bean.getTag(Constants.PARENT_OBJECT); if (parent != null) { object = parent.as(); } return new ValueProxyHolder((ValueProxy) object); } return null; } };
EntityProxyId<?> stableId = ((EntityProxy) getObject()).stableId(); @SuppressWarnings("unchecked") Class<EntityProxy> clazz = (Class<EntityProxy>) stableId.getProxyClass();
/** * Returns an unpopulated copy of the changed proxy — all properties are * undefined except its id. * * @return an instance of {@link EntityProxyId}<P> */ @SuppressWarnings("unchecked") public EntityProxyId<P> getProxyId() { return (EntityProxyId<P>) proxy.stableId(); }
/** * Returns the key Object for the given item. * * @param item an item of type P */ public Object getKey(P item) { return item == null ? null : item.stableId(); } }
/** * Returns the key Object for the given item. * * @param item an item of type P */ public Object getKey(P item) { return item == null ? null : item.stableId(); } }
/** * Returns an unpopulated copy of the changed proxy — all properties are * undefined except its id. * * @return an instance of {@link EntityProxyId}<P> */ @SuppressWarnings("unchecked") public EntityProxyId<P> getProxyId() { return (EntityProxyId<P>) proxy.stableId(); }
/** * Returns an unpopulated copy of the changed proxy — all properties are * undefined except its id. * * @return an instance of {@link EntityProxyId}<P> */ @SuppressWarnings("unchecked") public EntityProxyId<P> getProxyId() { return (EntityProxyId<P>) proxy.stableId(); }
public EntityProxyId<?> getProxyId() { return v.getRootBean() instanceof EntityProxy ? ((EntityProxy) v.getRootBean()) .stableId() : null; } });
public EntityProxyId<?> getProxyId() { return v.getRootBean() instanceof EntityProxy ? ((EntityProxy) v.getRootBean()) .stableId() : null; } });
public EntityProxyId<?> getProxyId() { return v.getRootBean() instanceof EntityProxy ? ((EntityProxy) v.getRootBean()) .stableId() : null; } });
public Object key(Object object) { if (object instanceof EntityProxy) { return ((EntityProxy) object).stableId(); } else if (object instanceof ValueProxy) { AutoBean<?> bean = AutoBeanUtils.getAutoBean(object); // Possibly replace an editable ValueProxy with its immutable base AutoBean<?> parent = bean.getTag(Constants.PARENT_OBJECT); if (parent != null) { object = parent.as(); } return new ValueProxyHolder((ValueProxy) object); } return null; } };
public Object key(Object object) { if (object instanceof EntityProxy) { return ((EntityProxy) object).stableId(); } else if (object instanceof ValueProxy) { AutoBean<?> bean = AutoBeanUtils.getAutoBean(object); // Possibly replace an editable ValueProxy with its immutable base AutoBean<?> parent = bean.getTag(Constants.PARENT_OBJECT); if (parent != null) { object = parent.as(); } return new ValueProxyHolder((ValueProxy) object); } return null; } };
EntityProxyId<?> stableId = ((EntityProxy) getObject()).stableId(); @SuppressWarnings("unchecked") Class<EntityProxy> clazz = (Class<EntityProxy>) stableId.getProxyClass();
EntityProxyId<?> stableId = ((EntityProxy) getObject()).stableId(); @SuppressWarnings("unchecked") Class<EntityProxy> clazz = (Class<EntityProxy>) stableId.getProxyClass();