ObjectDB Database Search

101-150 of 200 results

Persist error @ManyToMany how to define correct entities relationships

Category but they are all refering to same limited set of Category entities (via ID ). There is not changes made to Category from Product. The category ID is taken from the webservice Object ID (unique too). @Entity public class Product implements Serializable { @ Id @GeneratedValue private long id

javax.persistence.metamodel.SingularAttribute

: type of attribute Since: JPA 2.0 boolean isId () Is the attribute an id attribute. This method will return true if the attribute is an attribute that corresponds to a simple id , an embedded id , or an attribute of an id class. Return: boolean indicating whether the attribute is an id Since: JPA 2.0

SingularAttribute.isId() - JPA Method

JPA Method in javax.persistence.metamodel.SingularAttribute boolean isId () Is the attribute an id attribute. This method will return true if the attribute is an attribute that corresponds to a simple id , an embedded id , or an attribute of an id class. Return: boolean indicating whether the attribute is an id Since: JPA 2.0

javax.persistence.ConstructorResult

.createNativeQuery( "SELECT c. id , c.name, COUNT(o) as orderCount, AVG(o.price) AS avgOrder " + "FROM Customer c, Orders o " + "WHERE o.cid = c. id " + "GROUP BY c. id , c.name", "CustomerDetailsResult ... .CustomerDetails.class, columns={ @ColumnResult(name=" id "), @ColumnResult(name="name"), @ColumnResult

javax.persistence.EmbeddedId

. There must be only one EmbeddedId annotation and no Id annotation when the EmbeddedId annotation is used ... may only be used to override those attributes of the embedded id that do not correspond to the relationship to the parent entity. Relationship mappings defined within an embedded id class are not supported

javax.persistence.JoinTable

= @JoinColumn(name="CUST_ ID ", referencedColumnName=" ID "), inverseJoinColumns= @JoinColumn(name="PHONE_ ID ", referencedColumnName=" ID ") ) See Also: JoinColumn JoinColumns Since: JPA 1.0 Public Annotation

javax.persistence.ManyToMany

", joinColumns= @JoinColumn(name="CUST_ ID ", referencedColumnName=" ID "), inverseJoinColumns= @JoinColumn(name="PHONE_ ID ", referencedColumnName=" ID ") ) public Set getPhones() { return phones; } // In

javax.persistence.MapKey

is primary key public Map getEmployees() {... } ... } @Entity public class Employee { ... @ Id Integer getEmpId() { ... } @ManyToOne @JoinColumn(name="dept_ id ") public Department getDepartment ... (name="name") public Map getEmployees() {... } ... } @Entity public class Employee { @ Id public Integer

javax.persistence.MappedSuperclass

elements. Example: Concrete class as a mapped superclass @MappedSuperclass public class Employee { @ Id ... ") protected Address address; public Integer getEmpId() { ... } public void setEmpId(Integer id ... ="ADDR_ ID ")) public class PartTimeEmployee extends Employee { // Inherited empId field mapped to PT_EMP

javax.persistence.PersistenceUnitUtil

(Object entity) Return the id of the entity. A generated id is not guaranteed to be available until after the database insert has occurred. Returns null if the entity does not yet have an id . Parameters: entity - entity instance Return: id of the entity Throws: IllegalArgumentException

PersistenceUnitUtil.getIdentifier(entity) - JPA Method

;entity ) Return the id of the entity. A generated id is not guaranteed to be available until after the database insert has occurred. Returns null if the entity does not yet have an id . Parameters: entity - entity instance Return: id of the entity Throws: IllegalArgumentException - if the object is found not to be an entity Since: JPA 2.0

IdentifiableType.hasSingleIdAttribute() - JPA Method

JPA Method in javax.persistence.metamodel.IdentifiableType boolean hasSingleIdAttribute () Whether the identifiable type has a single id attribute. Returns true for a simple id or embedded id ; returns false for an idclass. Return: boolean indicating whether the identifiable type has a single id attribute Since: JPA 2.0

javax.persistence.EntityResult

when insufficient data is available are undefined. Example: Query q = em.createNativeQuery( "SELECT o. id , o.quantity, o.item, i. id , i.name, i.description "+ "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i. id )", "OrderItemResults"); @SqlResultSetMapping(name="OrderItemResults", entities

javax.persistence.MapsId

primary key @Entity public class Employee { @ Id long empId; String name; ... } // dependent entity uses ... id ; ... @MapsId("empid") // maps the empid attribute of embedded id @ManyToOne Employee emp

javax.persistence.OneToMany

; } In Order class: @ManyToOne @JoinColumn(name="CUST_ ID ", nullable=false) public Customer getCustomer ... getOrders() { return orders; } // In Order class: @ManyToOne @JoinColumn(name="CUST_ ID ", nullable=false ... ="CUST_ ID ") // join column is in table for Order public Set getOrders() {return orders;} Since: JPA 1

IdentifiableType.getIdClassAttributes() - JPA Method

JPA Method in javax.persistence.metamodel.IdentifiableType Set getIdClassAttributes () Return the attributes corresponding to the id class of the identifiable type. Return: id attributes Throws: IllegalArgumentException - if the identifiable type does not have an id class Since: JPA 2.0

javax.persistence.IdClass

public class Employee { @ Id String empName; @ Id Date birthDay; ... } Since: JPA 1.0 Public Annotation

javax.persistence.JoinColumn

@JoinColumn(name="ADDR_ ID ") public Address getAddress() { return address; } Example: unidirectional ... _ ID ") // join column is in table for Order public Set getOrders() {return orders

javax.persistence.JoinColumns

({ @JoinColumn(name="ADDR_ ID ", referencedColumnName=" ID "), @JoinColumn(name="ADDR_ZIP", referencedColumnName

javax.persistence.MapKeyColumn

field or property; "_"; "KEY". Example: @Entity public class Item { @ Id int id ; ... @ElementCollection

javax.persistence.PrimaryKeyJoinColumns

({ @PrimaryKeyJoinColumn(name="CUST_ ID ", referencedColumnName=" ID "), @PrimaryKeyJoinColumn(name="CUST

javax.persistence.SecondaryTable

=@PrimaryKeyJoinColumn(name="CUST_ ID ")) public class Customer { ... } Example 2: Single secondary table ... _DETAIL", pkJoinColumns={ @PrimaryKeyJoinColumn(name="CUST_ ID "), @PrimaryKeyJoinColumn(name="CUST_TYPE")}) public class

javax.persistence.SecondaryTables

_ ID ")), @SecondaryTable(name="EMP_HIST", pkJoinColumns=@PrimaryKeyJoinColumn(name="EMPLOYEE_ ID

javax.persistence.Transient

JPA Annotation Transient Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies that the property or field is not persistent. It is used to annotate a property or field of an entity class, mapped superclass, or embeddable class. Example: @Entity public class Employee { @ Id int id

IdentifiableType.getIdType() - JPA Method

JPA Method in javax.persistence.metamodel.IdentifiableType Type getIdType () Return the type that represents the type of the id . Return: type of id Since: JPA 2.0

PersistenceManagerFactory.setServerTimeZoneID(timezoneid) - JDO Method

 timezoneid ) Sets the TimeZone ID of the server associated with this PersistenceManagerFactory. The parameter is a String suitable for use with TimeZone.getTimeZone(). The String must match an ID ... , assume that the server has the same TimeZone ID as the client. If incorrectly set, the result

javax.jdo.JDOHelper

(Collection pcs) Get object ids for a collection of instances. For each instance in the parameter ... of the parameter Collection. Parameters: pcs - the persistence-capable instances Return: the object ids ... Object[] getObjectIds (Object[] pcs) Get object ids for an array of instances. For each instance in

javax.jdo.PersistenceManager

representation of the object id , or an object representation of a single field identity key Return ... ); Parameters: oid - The object id of the object to load Return: the corresponding persistent instance ... , Object key) This method returns an object id instance corresponding to the pcClass and key

javax.jdo.identity.ObjectIdentity

represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0 Object getKey () Return the key. Return: the key Since: JDO ... id . The class of the object id is written as the first part of the result so that the class

javax.jdo.JDONullIdentityException

An instance of this class is thrown when attempting to create an object id when the object id constructor parameter is null. This might occur when creating an object id instance from a transient instance

JDOImplHelper.newObjectIdInstance(pcClass,obj) - JDO Method

Class for JDO identity, using the key constructor of the object id class. It is intended for single ... class for the object id class, null is returned. For classes that use single field identity ... of the object id pcClass - the PersistenceCapable class. Return: the new ObjectId instance, or null if the class is not registered. Since: JDO 2.0

JDOHelper.getObjectIds(pcs) - JDO Static Method

JDO Static Method in javax.jdo.JDOHelper Collection getObjectIds (   Collection pcs ) Get object ids for a collection of instances. For each instance in the parameter, the getObjectId ... of the parameter Collection. Parameters: pcs - the persistence-capable instances Return: the object ids

JDOHelper.getObjectIds(pcs) - JDO Static Method

JDO Static Method in javax.jdo.JDOHelper Object[] getObjectIds (   Object[] pcs ) Get object ids for an array of instances. For each instance in the parameter, the getObjectId method ... . Parameters: pcs - the persistence-capable instances Return: the object ids of the parameters

PersistenceManager.newObjectIdInstance(pcClass,key) - JDO Method

JDO Method in javax.jdo.PersistenceManager Object newObjectIdInstance (   Class pcClass,    Object key ) This method returns an object id instance corresponding ... identity, the result of toString() on the object id instance. Return: an instance of the object identity class Since: JDO 1.0

PersistenceManagerFactory.getServerTimeZoneID() - JDO Method

JDO Method in javax.jdo.PersistenceManagerFactory String getServerTimeZoneID () Gets the TimeZone ID of the server associated with this PersistenceManagerFactory. If not set, assume that the server has the same TimeZone ID as the client. Return: the TimeZone of the server See Also: setServerTimeZoneID Since: JDO 2.1

javax.jdo.identity.ByteIdentity

represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0 byte getKey () Return the key. Return: the key Since: JDO 1.0

ByteIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.ByteIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.identity.CharIdentity

equals (Object obj) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0 char

CharIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.CharIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.identity.IntIdentity

Since: JDO 2.2 boolean equals (Object obj) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id

IntIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.IntIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.identity.LongIdentity

object id . Parameters: obj - the other object Return: true if both objects represent the same object id

LongIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.LongIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

ObjectIdentity.toString() - JDO Method

JDO Method in javax.jdo.identity.ObjectIdentity String toString () Return the String form of the object id . The class of the object id is written as the first part of the result so that the class can be reconstructed later. Then the toString of the key instance is appended. During construction

ObjectIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.ObjectIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.identity.ShortIdentity

the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0 short getKey () Return the key. Return: the key Since: JDO 1.0 Object

ShortIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.ShortIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.identity.StringIdentity

represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0 String getKey () Return the key. Return: the key Since: JDO 1.0

StringIdentity.equals(obj) - JDO Method

JDO Method in javax.jdo.identity.StringIdentity boolean equals (   Object obj ) Determine if the other object represents the same object id . Parameters: obj - the other object Return: true if both objects represent the same object id Since: JDO 1.0

javax.jdo.spi.Detachable

can set the object id , version, BitSet of loaded fields, and BitSet of modified fields ... of the Object[] jdoDetachedState is as follows: jdoDetachedState[0]: the Object Id of the instance