/** Constructor with class and key. * @param pcClass the target class * @param str the key */ public ByteIdentity(Class pcClass, String str) { super(pcClass); assertKeyNotNull(str); construct(Byte.parseByte(str)); }
/** Constructor with class and key. * @param pcClass the target class * @param key the key */ public ByteIdentity(Class pcClass, Byte key) { super(pcClass); setKeyAsObject(key); construct(key.byteValue()); }
/** Constructor with class and key. * @param pcClass the target class * @param key the key */ public ByteIdentity(Class pcClass, byte key) { super(pcClass); construct(key); }
public static SingleFieldIdentity getSingleFieldIdentityForDataNucleusIdentity(SingleFieldId dnid, Class targetClass) { if (dnid instanceof LongId) { return new LongIdentity(targetClass, dnid.toString()); } else if (dnid instanceof IntId) { return new IntIdentity(targetClass, dnid.toString()); } else if (dnid instanceof ShortId) { return new ShortIdentity(targetClass, dnid.toString()); } else if (dnid instanceof ByteId) { return new ByteIdentity(targetClass, dnid.toString()); } else if (dnid instanceof StringId) { return new StringIdentity(targetClass, dnid.toString()); } else if (dnid instanceof CharId) { return new CharIdentity(targetClass, dnid.toString()); } return new ObjectIdentity(targetClass, dnid.getKeyAsObject()); }
/** Constructor with class and key. * @param pcClass the target class * @param key the key */ public ByteIdentity(Class pcClass, byte key) { super(pcClass); construct(key); }
return Byte.parseByte(keyStr); } else { return new ByteIdentity(objectTypeClassFor(oid), keyStr);
/** Constructor with class and key. * @param pcClass the target class * @param str the key */ public ByteIdentity(Class pcClass, String str) { super(pcClass); assertKeyNotNull(str); construct(Byte.parseByte(str)); }
/** Constructor with class and key. * @param pcClass the target class * @param key the key */ public ByteIdentity(Class pcClass, Byte key) { super(pcClass); setKeyAsObject(key); construct(key.byteValue()); }