wisdom-orientdb

Wisdom-Orientdb wisdom framework sub-project parent pom.

License

License

GroupId

GroupId

org.wisdom-framework
ArtifactId

ArtifactId

wisdom-orientdb
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

pom
Description

Description

wisdom-orientdb
Wisdom-Orientdb wisdom framework sub-project parent pom.
Project URL

Project URL

https://github.com/wisdom-framework/wisdom-orientdb
Source Code Management

Source Code Management

https://github.com/wisdom-framework/wisdom-orientdb

Download wisdom-orientdb

How to add to project

<!-- https://jarcasting.com/artifacts/org.wisdom-framework/wisdom-orientdb/ -->
<dependency>
    <groupId>org.wisdom-framework</groupId>
    <artifactId>wisdom-orientdb</artifactId>
    <version>0.3.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.wisdom-framework/wisdom-orientdb/
implementation 'org.wisdom-framework:wisdom-orientdb:0.3.0'
// https://jarcasting.com/artifacts/org.wisdom-framework/wisdom-orientdb/
implementation ("org.wisdom-framework:wisdom-orientdb:0.3.0")
'org.wisdom-framework:wisdom-orientdb:pom:0.3.0'
<dependency org="org.wisdom-framework" name="wisdom-orientdb" rev="0.3.0">
  <artifact name="wisdom-orientdb" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.wisdom-framework', module='wisdom-orientdb', version='0.3.0')
)
libraryDependencies += "org.wisdom-framework" % "wisdom-orientdb" % "0.3.0"
[org.wisdom-framework/wisdom-orientdb "0.3.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • wisdom-orientdb-manager
  • wisdom-orientdb-object
  • wisdom-orientdb-document

Wisdom-OrientDB Build Status Coverity Scan Build Status Dependency Status

OrientDB is an open source NoSQL DBMS. It is fully written in Java. While it's a Document Database, it also has Graph and Object database features and API.

Wisdom-OrientDB brings OrientDB to your wisdom framework projects.

The wisdom-orientdb-object project provides an implementation of the Crud service; wrapping the object database features of OrientDB.

Set Up

In order to use wisdom-orientdb-object within your wisdom project, you must follow two steps.

The first is to add it's dependency in your pom.xml.

<dependency>
  <groupId>org.wisdom-framework</groupId>
  <artifactId>wisdom-orientdb-object</artifactId>
  <version>${release.version}</version>
</dependency>

The second step is to configure your OrientDB database in wisdom application.conf

orientdb.test.url="memory:todolist"
orientdb.test.user="test"
orientdb.test.pass="test"
orientdb.test.package="todolist.model"

The example above shows how to set up an orientdb database with an alias test. The orientdb.test.package is the name of the package that contains your entities.

Bellows are the optional properties that allows for a more tailored configuration

  • orientdb.<alias>.autolazyloading = boolean property, a convenient way to configure the default orientDB lazy loading behavior (default is true).
  • orientdb.<alias>.txtype = OTransaction.TXTYPE property | the default transaction type (TXTYPE.OPTIMISTIC by default).
  • orientdb.<alias>.poolmin = integer property, the minimun value of the database connection pool (1 by default).
  • orientdb.<alias>.poolmax = integer property, the minimun value of the database connection pool (20 by default).

Alternative

As an alternative you can set up your OrientDB model by providing an OrientDbRepoCommand service.

    WOrientConf getConf();
    List<Class<?>> getEntityClass();
    void init(OObjectDatabaseTx db);
    void destroy(OObjectDatabaseTx db);

The service implementation must contain the configuration and the entities class list. The init and destroy callback are hook that allows for: registering and de-registering your entities, as well as manage evolution.

Usage

Once wisdom-orientDB has been properly set up you can now requires either wisdom Crud services or the specialized OrientDbCrud for each of the entity available in your model package.

The following example illustrates how to inject an OrientDBCrud service for the entity Todo.class. An entity is a java class annotated with javax.persistence.Entity.

@Model(value = Todo.class)
private OrientDbCrud<Todo,String> todoCrud;

More information about the behavior of the OrientDB database is available on their wiki.

Troubleshooting

OrientDB uses javassist in order to create proxy for the entity object. This can cause your project to experience some problems when being dynamicaly updated if it does not have javassist.util.proxy.Proxy in its classpath. A work around is to load this class in one of your component.

import javassist.util.proxy.Proxy;
//...
static {Class workaround = Proxy.class;}
//...
org.wisdom-framework

Wisdom Framework

Versions

Version
0.3.0
0.2.6
0.2.4
0.2.2
0.2.0
0.1