gemire / daofusion Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/daofusion
Automatically exported from code.google.com/p/daofusion
Currently, PersistentEntity<ID extends Serializable> class has three direct
subclasses:
- MutablePersistentEntity
- ImmutablePersistentEntity
- PersistentEnumeration
all of them using Long as the ID.
Introduction of bitemporal classes showed that this has to be revised:
BitemporalWrapper<V> extends MutablePersistentEntity essentially forces you
to track bitemporal data along with validity/record interval in a mapped
superclass (BitemporalWrapper) using Long as the primary key column type.
I propose that the <ID extends Serializable> type parameter should be
retained for the three subclasses mentioned above.
Additionally, we should consider adding an abstract implementation of
Persistable<ID> for entities which can't use @GeneratedValue annotation on
their id's (e.g. an alternative to PersistentEntity).
Original issue reported on code.google.com by [email protected]
on 8 Sep 2009 at 11:44
When H2 core integration tests successfully finish their execution (green
bar), an exception originating from the Hibernate schema export tool is thrown:
ERROR org.hibernate.tool.hbm2ddl.SchemaExport - schema export unsuccessful
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable
automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db
URL) [90121-79]
at org.h2.message.Message.getSQLException(Message.java:103)
at org.h2.message.Message.getSQLException(Message.java:114)
at org.h2.message.Message.getSQLException(Message.java:77)
at org.h2.message.Message.getSQLException(Message.java:149)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1283)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:402)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.jav
a:985)
at
org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(Su
ppliedConnectionProviderConnectionHelper.java:52)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:221)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:846)
at
org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:4
6)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManage
rFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:434)
at $Proxy35.close(Unknown Source)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.destroy(AbstractEnt
ityManagerFactoryBean.java:392)
at
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(Disposab
leBeanAdapter.java:151)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBe
an(DefaultSingletonBeanRegistry.java:487)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySi
ngleton(DefaultSingletonBeanRegistry.java:462)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBe
an(DefaultSingletonBeanRegistry.java:480)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySi
ngleton(DefaultSingletonBeanRegistry.java:462)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySi
ngletons(DefaultSingletonBeanRegistry.java:430)
at
org.springframework.context.support.AbstractApplicationContext.destroyBeans(Abst
ractApplicationContext.java:853)
at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractA
pplicationContext.java:831)
at
org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApp
licationContext.java:764)
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 3:40
Hi!
I'm trying to make DAO in my project based on DAO Fusion.
I've tried the hello-dao tutotrial, but I've recieved the compilation error:
Scanning for additional dependencies: file:/E:/WS/App/src/main/java/ru/app/client/ui/data/datasources/VersionDataSource.java
Computing all possible rebind results for 'ru.app.client.services.projectinfo.VersionService'
Rebinding ru.app.client.services.projectinfo.VersionService
Checking rule <generate-with class='com.google.gwt.inject.rebind.GinjectorGenerator'/>
[ERROR] Errors in 'file:/E:/WS/App/src/main/java/ru/app/client/services/GridService.java'
[ERROR] Line 9: No source code is available for type com.anasoft.os.daofusion.cto.client.CriteriaTransferObject; did you forget to inherit a required module?
[ERROR] Unable to find type 'ru.app.client.services.projectinfo.VersionService'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] Errors in 'file:/E:/WS/App/src/main/java/ru/app/client/ui/data/datasources/VersionDataSource.java'
[ERROR] Line 26: Failed to resolve 'ru.app.client.services.projectinfo.VersionService' via deferred binding
[ERROR] Cannot proceed due to previous errors
Sources for App.gwt.xml:
<source path='client' />
<source path='shared' />
<source path='com/anasoft/os/daofusion/cto/client' />
Line 9 in GridService:
ResultSet<DTO> fetch(CriteriaTransferObject cto) throws DeanServicesException;
Line 26 in VersionDataSource:
public static final VersionServiceAsync service =
GWT.create(VersionService.class);
What can be the reason of this problem and how I can resolve it?
Regards,
Tatyana
Original issue reported on code.google.com by [email protected]
on 20 Feb 2012 at 9:29
What steps will reproduce the problem?
1. svn checkout http://daofusion.googlecode.com/svn/trunk/ daofusion-read-only
2. mvn eclipse:eclips
3. "mvn jetty:ru
What is the expected output? What do you see instead?
BUILD SHOULD BE SUCCESS
What version of the product are you using? On what operating system?
what ever us in #1
Please provide any additional information below.
INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ hello-dao ---
[INFO] Compiling 33 source files to
/u/chaituvk/temp/myhibernate/daofusion-read-only/samples/hello-dao/target/classe
s
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: error reading
/u/chaituvk/.m2/repository/org/hibernate/hibernate-core/3.3.2.GA/hibernate-core-
3.3.2.GA.jar; invalid CEN header (bad signature)
[ERROR] error: error reading
/u/chaituvk/.m2/repository/com/google/gwt/gwt-user/1.7.0/gwt-user-1.7.0.jar;
invalid CEN header (bad signature)
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.718s
[INFO] Finished at: Sun Feb 02 14:53:11 IST 2014
[INFO] Final Memory: 17M/964M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)
on project hello-dao: Compilation failure: Compilation failure:
[ERROR] error: error reading
/u/chaituvk/.m2/repository/org/hibernate/hibernate-core/3.3.2.GA/hibernate-core-
3.3.2.GA.jar; invalid CEN header (bad signature)
[ERROR] error: error reading
/u/kondak/.m2/repository/com/google/gwt/gwt-user/1.7.0/gwt-user-1.7.0.jar;
invalid CEN header (bad signature)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2014 at 9:30
In relation to discussion here:
http://groups.google.com/group/dao-fusion/browse_thread/thread/e1ece1641af9c970
The task is to incorporatesome parts of the Java framework done by Erwin
Vervaet and Christophe Vanfleteren.
steps:
* extend persistent entity model of DAO Fusion for bitemporal entities
* modify imported java source mainly in terms of class parametrization
and usage of annotations instead of .hbm.xml files
* create example application
* write documentation and tutorial
Original issue reported on code.google.com by [email protected]
on 15 Jun 2009 at 8:36
The code you provided in the web site for the OidBasedMutablePersistentEntity
would be great if you provide it in the main distribution.
Original issue reported on code.google.com by mauro.franceschini
on 16 Jul 2010 at 1:41
NestedPropertyCriterion and its subclasses currently support dot-separated
property path as a String only (in the end, the user has to concatenate
path elements on his own). Furthermore, it is not possible to specify
custom join types for individual path element junctions (single join type
for entire property path).
We propose refactoring based on object representation of association path
and its elements, which leads to the target property. A special class
(AssociationPathRegister) will replace the old "subCriteriaMap" in
NestedPropertyCriteria.
Original issue reported on code.google.com by [email protected]
on 1 Jun 2009 at 10:58
Guys,
I have been trying to use DAO Fusion-bitemporal implementation for my application.
While the overall concept is good, i am facing few issues while trying to write
few test cases.
Sample test case - BiTemporalTraceTest.Java is not complete example to
demonstrate the bitemporal functionality. it would great, if you have detailed
test cases in test suite.
I have tried to add few cases - fin your example customer/order./bitemp_order.
i am stuck in fundamental issue. This API is not maintaining the all the states
of 'order' during various points of the time. at any point of time it has only
latest status of 'order' object.
for example - for given order id 1 - on jan1'2014 - i have billing address as
NYC and it got changes to LON on Jan'4-2014. i am not able to get two states
of order object with this API.
However bitemp_order is updating valid start & valid end properly. having along
the time period not enough with actual values.
Since i am running short of time, it would be great, if you can help me in
this. if you need further i can mail you.
Thanks
Chaitanya
Original issue reported on code.google.com by [email protected]
on 25 Feb 2014 at 3:01
If I have create nested property criteria with duplication in association
path elements ('metaData.value' and 'status.value'), result criteria
hierarchy is not correct.
SubCriteria for status.value is bound (parent) to metaData SubCriteria,
but must be bound to status SubCriteria.
Problem is on line
com.anasoft.os.daofusion.criteria.NestedPropertyCriteria#198, where
comparation of names is insufficient. There must be comparation of quite
association path - from root to element.
Source code version: trunk/2009-04-15-16:46
Original issue reported on code.google.com by [email protected]
on 15 Apr 2009 at 2:46
The bitemporal pattern implementation currently integrates with standard
persistent entity model. The user is therefore responsible for creating
custom NestedPropertyCriteria or using generic NestedPropertyCriteria for
expressing bitemporal trace constraints.
For example, extending FilterCriterion to be applied to NestedPropertyCriteria:
public class BitemporalValidAtCriterion extends FilterCriterion {
public BitemporalValidAtCriterion(AssociationPath associationPath) {
this(associationPath, TimeUtils.now());
}
public BitemporalValidAtCriterion(AssociationPath associationPath,
final DateTime instant) {
super(associationPath, null, new SimpleFilterCriterionProvider() {
public Criterion getCriterion(String targetPropertyName,
Object[] filterObjectValues, Object[] directValues) {
return TemporalRestrictions.validAt(instant);
}
});
}
}
Together with following temporal restriction helper class (bitemporal
alternative to "org.hibernate.criterion.Restrictions":
public final class TemporalRestrictions {
public static Criterion validAt(DateTime validAt){
Date date = validAt.toGregorianCalendar().getTime();
return Restrictions.and(
Restrictions.le(BitemporalWrapper._VALID_FROM, date),
Restrictions.gt(BitemporalWrapper._VALID_TO, date));
}
}
Restrictions placed on bitemporal value, on the other hand, can be done
using plain FilterCriterion's (they just need to start at the bitemporal
collection and navigate through its "value" persistent property to the
actual value class).
Criteria Transfer Object (CTO) support for bitemporal pattern should then
build upon such Criteria API extensions. If we could do this, bitemporal
constraints can be expressed within the CTO itself -- no need for
extracting CTO column values and building bitemporal criteria by hand!
Original issue reported on code.google.com by [email protected]
on 14 Sep 2009 at 11:54
What steps will reproduce the problem?
1. using the bitemporal history of dao fusion
Please provide any additional information below.
As discussed with Igor in the Discussion group, here comes a branch that
improves performance of bitemporal queries and actions and introduces new
Abstract Superclasses for Bitemps and Traceholders to reduce unnecessary code.
I also have some nice TestCases and a complex TestModel, but didn't manage to
integrate them into the daofusion-test project, since it's setup is rather
complicated(as probably necessary with that many DBs). But they still need a DB
to make sense, so what would you think is the best way to provide these?
Original issue reported on code.google.com by [email protected]
on 18 Mar 2011 at 12:41
Attachments:
DAO Fusion currently delegates PropertyFilterCriterionProvider
implementation to the developer.
We could have a helper class for commonly used
PropertyFilterCriterionProvider's, like this:
public static class LikeFilterCriterion implements
PropertyFilterCriterionProvider {
public Criterion getCriterion(String targetPropertyName, Object[]
filterObjectValues, Object[] directValues) {
return Restrictions.like(targetPropertyName, directValues[0]);
}
public boolean enabled(Object[] filterObjectValues, Object[]
directValues) {
return (directValues.length == 1 && directValues[0] != null);
}
}
These would be based on some abstract PropertyFilterCriterionProvider
implementations, such as UnaryDirectValueProvider / BinaryDirectValueProvider:
http://opensource.anasoft.sk/daofusion-site/reference/cto-pattern.html
Original issue reported on code.google.com by [email protected]
on 21 May 2009 at 12:05
I need to merge NestedPropertyCriteria with additional criterias
(PersistentEntityCriteria), but merging must eliminate duplicity in
associatin path elements.
Original issue reported on code.google.com by [email protected]
on 15 Apr 2009 at 2:32
It would be useful if, instead of HibernateEntityManager will be possible to
use plain SessionFactory.
The getSession() method marked final let's make impossibile this and all
through the code of Base DAO classes the plain EntityManager API (JPA) is never
used, always passing through the getSession() method.
Original issue reported on code.google.com by mauro.franceschini
on 16 Jul 2010 at 1:39
We already have getAll() methods defined in PersistentEntityDao:
public <S extends T> List<S> getAll(Class<S> targetEntityClass);
public List<T> getAll();
For consistency, we should also add corresponding countAll() methods.
Currently, count() can be performed only via PersistentEntityCriteria.
Original issue reported on code.google.com by [email protected]
on 21 May 2009 at 9:34
Assume a scenario with CriteriaTransferObject containing paging information
along with FilterAndSortCriteria instances employing both filtering and
sorting capabilities.
When NestedPropertyCriteriaBasedConverter converts CriteriaTransferObject
instance into NestedPropertyCriteria, this NestedPropertyCriteria contains
all of the above (paging, filtering, sorting).
Passing this NestedPropertyCriteria instance into
AbstractHibernateEntityDao#count() results in SQL exception using H2
database. Experiments have shown that Oracle 10g handles this case without
problems.
Root cause of this issue is most probably that
NestedPropertyCriteria#apply() performs changes to target Hibernate
Criteria instance which are not appropriate for semantics of count() -
paging and sorting.
DAO Fusion version: 1.0.1
Database: H2 1.0.79
Proposed solution: NestedPropertyCriteriaBasedConverter must distinguish
two typical cases for which specific NestedPropertyCriteria instance is
required:
- query (subset of entities for given criteria)
- count (filtering criteria only)
Two methods could be added to NestedPropertyCriteriaBasedConverter:
- convertForQuery()
- convertForCount()
As a result, NestedPropertyMapping#apply() will be replaced by similar
methods for two cases presented above.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2009 at 3:34
CriteriaTransferObject#add(criteria) method actually performs Map#put(). I
think it should be renamed to put() to avoid confusion (method Javadoc
doesn't state whether the criteria parameter replaces previous one
according to its propertyId).
Original issue reported on code.google.com by [email protected]
on 21 May 2009 at 9:54
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.