ObjectDB Database Search

51-100 of 200 results

The drop code word does not work?

The drop code word does not work?

Spring LTW Problem

Hello! I use ObjectDB with Spring. Today i tried to swich from AspectJ compile time weaving to load time weaving . (To get Jrebel working properly) So i added      To my context.xml and to my spring configuration. Now Spring oviously tries to weave every class that get's loaded

Integration

the new ObjectDB build load time weaving (enhancement) by Spring is currently disabled ... know i'm not using loadtime weaving but compile time weaving with aspectj) anyway, i got a spring ... ) to gain performance. I wonder what would happen if you would enable Spring load time weaving

Java 8 Enhancer Problem

weaving . Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class ... an exception which causes Spring to stop weaving .  Caused by: com.objectdb.o.InternalException ... the exception and output a log message like "Java 8 weaving currently not supported." instead

Query problem after transaction commit

; support Support Attached please find the test code . The screen output is at the end of the post ... for all object Goods successfully] 04 SELECT u FROM Goods u where u._ code like : code AND u._desc like :desc  05 code = %, desc= % 06 UI: end query 07 UI: start printing result 08 code = A, desc= Good

Spring MVC Errors

get the last part of the tutorial: "To enable on the fly automatic enhancement ( weaving ) in Tomcat ... enhancement ( weaving ) is automatically enabled without specifying a Java agent." P.S: I was using

ObjectDB - JPA Object Database for Java

- start writing more effective database code using Java classes and objects! Try an ObjectDB / JPA

Defining a JPA Entity Class

Entity Classes Storing an entity object in the database does not store methods and code

Is ObjectDB better than Object Relational Mapping (ORM)?

databases when necessary - with exactly the same code .

Eclipse Distribution License - v 1.0

Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice

CRUD Database Operations with JPA

Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store, retrieve, update and delete database objects. Storing New Entity Objects The following code fragment stores 1,000 Point  objects in the database: em. getTransaction (). begin

Running JPA Queries

and the code is simple: Query query = em. createQuery ("SELECT COUNT(c) FROM Country c"); long countryCount

Paths and Types in JPQL and Criteria API

. get ("capital"); Path captialName = capital. get ("name"); The path expressions in the above code

Locking in JPA

a PESSIMISTIC_READ lock on that database object. For example, consider the following code fragment: em1

Database Explorer

defined methods can be supported by the Explorer only when the code of these methods is available using

Generating new activation code gives 500 server error

Generating new activation code gives 500 server error

NullPointer when accessing persistent field

you a snapshot of some of the utility dependencies )   The code being called is accessing a map declared ... and db files ( transaction is rolled back )   The packages were all enhanced ( static weaving ... java.util.Map z_registers  = new java.util.HashMap (); As before Enhancer is being run on code

InterfaceRef jakarta.persistence.EntityManager

for rollback. Parameters: function - the function - the connection type, usually {@ code java.sql ... TransactionRequiredException - if there is no transaction and a lock mode other than {@ code ... and a lock mode other than {@ code NONE} is specified OptimisticLockException - if the optimistic

InterfaceRef jakarta.persistence.spi.PersistenceProvider

the classpath, the container must pass the {@ code ValidatorFactory} instance in the map with the key {@ code ... , the container must pass the {@ code BeanManager} instance in the map with the key {@ code "jakarta.persistence ... may be used to override the values of the corresponding elements in the {@ code persistence.xml} file or

InterfaceRef jakarta.persistence.Query

- if a lock mode other than {@ code NONE} has been set and there is no transaction or the persistence ... other than {@ code NONE} has been set and there is no transaction or the persistence context has not ... back TransactionRequiredException - if a lock mode other than {@ code NONE} has been set

InterfaceRef jakarta.persistence.TypedQuery

back TransactionRequiredException - if a lock mode other than {@ code NONE} has been set ... - if a lock mode other than {@ code NONE} has been set and there is no transaction or the persistence ... and only the statement is rolled back TransactionRequiredException - if a lock mode other than {@ code

PersistenceProvider.createContainerEntityManagerFactory(info,map) - JPA Method

, the container must pass the {@ code ValidatorFactory} instance in the map with the key {@ code "jakarta ... the {@ code BeanManager} instance in the map with the key {@ code "jakarta.persistence.bean.manager

NetBeans/JPA Spring MVC Web Tutorial

and menus might look slightly different but the code would be the same). The tutorial is based on using

Step 2: Entity Class and Persistence Unit

and paste to replace the new source file content with the following code : package guest; import

Step 3: Add a Main Class

to create the class. Copy and paste the following code to the newly created class file: package

Step 3: Add a Main Class

In this step we will add code to the Main class (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. Use copy and paste to replace the content of the Main class with the following content: package tutorial; import javax

Step 4: Add a Controller Class

replace the content of the new source file with the following code : package guest; import javax.servlet

Eclipse/JPA Java EE Tutorial

with other Eclipse versions as well (dialog boxes and menus might look slightly different but the code

Eclipse/JPA Web Application Tutorial

but the code would be the same). The Tutorial Steps This tutorial consists of the following steps:

Step 2: Entity Class and Persistence Unit

to replace the new source file content with the following code : package guest; import java.io

Step 2: Define a JPA Entity Class

and paste to replace the new source file content with the following code : package guest; import java.io

Getting Started with JPA

This tutorial demonstrates how to create and run a simple JPA application. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  Point has two persistent fields -  x and  y . If you already know JPA - the source code will be straightforward

Step 3: Define a Spring DAO Component

replace the content of the new source file with the following code : package guest; import java.util

NetBeans/JPA Java EE Tutorial

well (dialog boxes and menus might look slightly different but the code would be the same). Note

Step 4: Add a Servlet Class

of the new source file with the following code : package guest; import java.io.IOException; import javax

Step 2: Define a JPA Entity Class

code : package guest; import java.io.Serializable; import java.sql.Date; import javax.persistence.Entity

Step 3: Define an EJB Session Bean

with the following code : package guest; import java.util.List; import javax.ejb.Stateless; import javax.persistence

Step 4: Add a Servlet Class

the new servlet class. Now replace the content of the new source file with the following code : package

Getting Started with JPA and NetBeans

well (dialog boxes and menus might look slightly different but the code would be the same). This tutorial consists of the following steps:

Step 4: Add a Servlet Class

of the new source file with the following code : package guest; import java.io.IOException; import java

InterfaceRef jakarta.persistence.EntityManagerFactory

: entityType - any Java type, including {@ code Object.class} meaning all entity graphs - the specified ... {@ code Object.class} meaning all queries - the specified upper bound on the query result types Return ... to be returned. This is usually either the underlying class implementing {@ code

EntityManager.persist(entity) - JPA Method

Throws: EntityExistsException - if the given entity is detached (if the entity is detached, the {@ code EntityExistsException} may be thrown when the persist operation is invoked, or the {@ code EntityExistsException} or another {@ code PersistenceException} may be thrown at flush or commit time

InterfaceRef jakarta.persistence.criteria.SetJoin

JPA Interface SetJoin Type Parameters: - the source type of the join - the element type of the target {@ code Set} Super Interfaces: Expression , FetchParent , From , Join , Path , PluralJoin ... . Return: metamodel type representing the {@ code Set} that is the target of the join Since: JPA 2.0

InterfaceRef jakarta.persistence.SchemaManager

. Parameters: createSchemas - if {@ code true} , attempt to create schemas, otherwise, assume the schemas ... and continue. Parameters: dropSchemas - if {@ code true} , drop schemas, otherwise, leave them be Since: JPA 3.2

InterfaceRef jakarta.persistence.ConnectionConsumer

JPA Interface ConnectionConsumer Type Parameters: - the connection type, usually {@ code java.sql.Connection} An executable action which makes use of a native database connection. The connection ... the connection, usually a {@ code java.sql.SQLException} Since: JPA 3.2

InterfaceRef jakarta.persistence.ConnectionFunction

JPA Interface ConnectionFunction Type Parameters: - the connection type, usually {@ code java.sql.Connection} A function which makes use of a native database connection to compute a result ... occurs calling the connection, usually a {@ code java.sql.SQLException} Since: JPA 3.2

InterfaceRef jakarta.persistence.AttributeNode

with this attribute node's map key or an empty {@ code Map} if none have been defined Since: JPA 2.1 Map ... } of subgraphs associated with this attribute node or an empty {@ code Map} if none have been defined Since: JPA 2.1

EntityManager.find(entityClass,primaryKey,options) - JPA Method

TransactionRequiredException - if there is no transaction and a lock mode other than {@ code ... and a lock mode other than {@ code NONE} is specified OptimisticLockException - if the optimistic version

EntityManager.find(entityGraph,primaryKey,options) - JPA Method

TransactionRequiredException - if there is no transaction and a lock mode other than {@ code ... and a lock mode other than {@ code NONE} is specified OptimisticLockException - if the optimistic

Which API should I use - JPA or JDO?

, tutorials and sample code . When to prefer JDO JDO might be preferred when portability to other object