initial add of EbeanORM server based on v2.8.1

This commit is contained in:
rbygrave committed 2012-09-14 00:40:39 +12:00
1 parent 2b74d0f9d9
commit 96ce4c0ddf
1188 files changed
+135034

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings>
<entity class="com.avaje.tests.model.basic.OrderAggregate">
<raw-sql name="default">
<columnMapping column="order_id" property="order.id" />
<query>
select order_id, count(*) as totalItems, sum(order_qty*unit_price) as totalAmount
from o_order_detail
group by order_id
</query>
</raw-sql>
<raw-sql name="total.amount">
<columnMapping column="order_id" property="order.id" />
<query>
select order_id, sum(order_qty*unit_price) as totalAmount
from o_order_detail
group by order_id
</query>
</raw-sql>
<sql-select name="total.qty">
<query>
select order_id, count(*) as total_items, sum(order_qty*unit_price) as total_amount
from o_order_detail
group by order_id
</query>
</sql-select>
<sql-select name="total">
<query>
select order_id, sum(order_qty*unit_price) as total_amount
from o_order_detail
group by order_id
</query>
</sql-select>
</entity>
<entity class="com.avaje.tests.model.basic.TMapSuperEntity">
<raw-sql name="testTransient">
<columnMapping column="id" property="id" />
<columnMapping column="name" property="name" />
<query>
select id, name, 12 as myint from t_mapsuper1
</query>
</raw-sql>
</entity>
<entity class="com.avaje.tests.model.basic.MyAdHoc">
<raw-sql name="default">
<columnMapping column="order_id" property="order.id" />
<query>
select order_id, count(*) as detailCount from o_order_detail group by order_id
</query>
</raw-sql>
</entity>
<entity class="com.avaje.tests.noid.NoIdEntity">
<raw-sql name="noid">
<columnMapping column="id" property="id" />
<columnMapping column="value" property="value" />
<query>
select id, value from No_Id_Entity_Rob
</query>
</raw-sql>
</entity>
</entity-mappings>
+134
View File
@@ -0,0 +1,134 @@
## -------------------------------------------------------------
## Load (Dev/Test/Prod) server specific properties
## -------------------------------------------------------------
## This is a possible alternative to using JNDI to set environment
## properties externally (to the WAR file). This is another way
## your Dev, Test and Prod servers can have different properties.
#load.properties.override=${CATALINA_HOME}/conf/myapp.ebean.properties
ebean.encryptKeyManager=com.avaje.tests.basic.encrypt.BasicEncyptKeyManager
#ebean.vanillaMode=true
#ebean.allowSubclassing=false
ebean.autofetch.querytuning=false
ebean.autofetch.profiling=false
ebean.autofetch.implicitmode=default_off
#ebean.autofetch.implicitmode=default_onifempty
ebean.autofetch.profiling.min=1
ebean.autofetch.profiling.base=10
#ebean.autofetch.profiling.rate=0.05
ebean.autofetch.traceUsageCollection=false
ebean.ddl.generate=true
ebean.ddl.run=true
ebean.debug.sql=true
#ebean.debug.lazyload=false
#ebean.cluster.type=mcast
#ebean.cluster.mcast.listen.port=9768
#ebean.cluster.mcast.listen.address=235.1.1.1
#ebean.cluster.mcast.listen.disableLoopback=false
#ebean.cluster.mcast.send.port=9766
##ebean.debug.remotetransaction=true
#ebean.cluster.debuglevel=1
## -------------------------------------------------------------
## Transaction Logging
## -------------------------------------------------------------
## Use java util logging to log transaction details
#ebean.loggingToJavaLogger=true
## General logging level: (none, summary, sql)
ebean.logging.level=sql
## location of transaction logs
ebean.logging.directory=logs
#ebean.logging.directory=${catalina.base}/logs/trans
ebean.cacheWarmingDelay=-1
##ebean.transaction.rollbackOnChecked=false
## -------------------------------------------------------------
## Data Types
## -------------------------------------------------------------
#ebean.pg.databaseBooleanTrue=1
#ebean.pg.databaseBooleanFalse=0
## -------------------------------------------------------------
## Batch Mode
## -------------------------------------------------------------
#ebean.batch.mode=true
#ebean.batch.size=20
#ebean.namingConvention=com.avaje.ebean.config.UnderscoreNamingConvention
#ebean.namingConvention.sequenceFormat={table}_{column}_seq
#ebean.databaseSequenceBatchSize=1
## -------------------------------------------------------------
## DataSources (If using default Ebean DataSourceFactory)
## -------------------------------------------------------------
datasource.default=h2
datasource.h2.username=sa
datasource.h2.password=
datasource.h2.databaseUrl=jdbc:h2:mem:tests;DB_CLOSE_DELAY=-1
datasource.h2.databaseDriver=org.h2.Driver
datasource.h2.minConnections=1
datasource.h2.maxConnections=25
datasource.h2.heartbeatsql=select 1
datasource.h2.isolationlevel=read_committed
datasource.h2.capturestacktrace=true
datasource.h2.maxStackTraceSize=20
datasource.h2.poolListener=com.avaje.tests.basic.MyTestDataSourcePoolListener
datasource.hsqldb.username=sa
datasource.hsqldb.password=
datasource.hsqldb.databaseUrl=jdbc:hsqldb:mem:tests
datasource.hsqldb.databaseDriver=org.hsqldb.jdbcDriver
datasource.hsqldb.minConnections=1
datasource.hsqldb.maxConnections=25
datasource.mysql.username=test
datasource.mysql.password=test
datasource.mysql.databaseUrl=jdbc:mysql://127.0.0.1:3306/test
datasource.mysql.databaseDriver=com.mysql.jdbc.Driver
datasource.mysql.minConnections=1
datasource.mysql.maxConnections=25
#datasource.mysql.heartbeatsql=select count(*) from dual
datasource.mysql.isolationlevel=read_committed
datasource.ora.username=junk
datasource.ora.password=junk
datasource.ora.databaseUrl=jdbc:oracle:thin:@127.0.0.1:1521:XE
datasource.ora.databaseDriver=oracle.jdbc.driver.OracleDriver
datasource.ora.minConnections=1
datasource.ora.maxConnections=10
datasource.ora.heartbeatsql=select count(*) from dual
datasource.ora.isolationlevel=read_committed
datasource.ora.capturestacktrace=true
datasource.ora.customProperties=oracle.net.CONNECT_TIMEOUT=3000;oracle.jdbc.ReadTimeout=10000
datasource.pg.username=test
datasource.pg.password=test
datasource.pg.databaseUrl=jdbc:postgresql://127.0.0.1:5433/test
datasource.pg.databaseDriver=org.postgresql.Driver
datasource.pg.heartbeatsql=select 1
datasource.ms.username=sa
datasource.ms.password=changeme
datasource.ms.databaseUrl=jdbc:sqlserver://localhost:65188
datasource.ms.databaseDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
+85
View File
@@ -0,0 +1,85 @@
{
"version": "1.0",
"encoding": "UTF-8",
"feed": {
"xmlns": "http://www.w3.org/2005/Atom",
"xmlns$openSearch": "http://a9.com/-/spec/opensearchrss/1.0/",
"xmlns$gd": "http://schemas.google.com/g/2005",
"xmlns$gCal": "http://schemas.google.com/gCal/2005",
"id": {"$t": "..."},
"updated": {"$t": "2006-11-12T21:25:30.000Z"},
"title": {
"type": "text",
"$t": "Google Developer Events"
},
"subtitle": {
"type": "text",
"$t": "The calendar contains information about upcoming developer
conferences at which Google will be speaking, along with other
developer-related events."
},
"link": [{
"rel": "...",
"type": "application/atom+xml",
"href": "..."
},{
"rel": "self",
"type": "application/atom+xml",
"href": "..."
}],
"author": [{
"name": {"$t": "Google Developer Calendar"},
"email": {"$t": "developer-calendar@google.com"}
}],
"generator":{
"version": "1.0",
"uri": "http://www.google.com/calendar",
"$t": "Google Calendar"
},
"openSearch$startIndex": {"$t": "1"},
"openSearch$itemsPerPage": {"$t": "25"},
"gCal$timezone": {"value": "America/Los_Angeles"},
"entry": [{
"id": {"$t": "..."},
"published": {"$t": "2006-11-12T21:25:30.000Z"},
"updated": {"$t": "2006-11-12T21:25:30.000Z"},
"category": [{
"scheme": "...",
"term": "..."
}],
"title":{
"type": "text",
"$t": "WebmasterWorld PubCon 2006: Google Developer Tools in General"
},
"content": {
"type": "text",
"$t": "Google is sponsoring "
},
"link": [{
"rel": "alternate",
"type": "text/html",
"href": "...",
"title": "alternate"
},{
"rel": "self",
"type": "application/atom+xml",
"href": "..."
}],
"author": [{
"name": {"$t": "Google Developer Calendar"},
"email": {"$t": "developer-calendar@google.com"}
}],
"gd$transparency": {"value": "http://schemas.google.com/g/2005#event.opaque"},
"gd$eventStatus": {"value": "http://schemas.google.com/g/2005#event.confirmed"},
"gd$comments": {"gd$feedLink": {"href": "..."}},
"gCal$sendEventNotifications": {"value": "true"},
"gd$when": [{
"startTime": "2006-11-15",
"endTime": "2006-11-17",
"gd$reminder": [{"minutes": "10"}]
}],
"gd$where": [{"valueString": "3150 Paradise Road,Las Vegas,NV 89109"}]
}]
}
}
+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd">
<package>com.avaje.tests.model.basic</package>
<entity class="com.avaje.tests.model.basic.Order">
<named-query name="top.open">
<query>
find order
join customer (name)
join customer.billingAddress (*)
join details
join details.product (sku, name)
order by customer.name asc
limit 10
</query>
</named-query>
<named-query name="top.open">
<query>
find order
join customer (name)
join customer.billingAddress (*)
join details
join details.product (sku, name)
order by customer.name asc
limit 10
</query>
</named-query>
</entity>
<named-native-query name="find.order">
<query>
select * from o_order where id = :id
</query>
</named-native-query>
</entity-mappings>
+9
View File
@@ -0,0 +1,9 @@
10000,NEW,"Rob",01-JAN-2009,"12 someplace",Auckland,NZ
,ACTIVE,"Greg",14-FEB-2009,"13 someplace",Sydney,AU
,INACTIVE,"Dan",29-SEP-2009,"14 someplace",Auckland,NZ
,NEW,"ARob",01-JAN-2009,"12 someplace",Auckland,NZ
,ACTIVE,"BGreg",14-FEB-2009,"13 someplace",Sydney,AU
,INACTIVE,"CDan",29-SEP-2009,"14 someplace",Auckland,NZ
,NEW,"DRob",01-JAN-2009,"12 someplace",Auckland,NZ
,ACTIVE,"EGreg",14-FEB-2009,"13 someplace",Sydney,AU
,INACTIVE,"FDan",29-SEP-2009,"14 someplace",Auckland,NZ
1 10000 NEW Rob 01-JAN-2009 12 someplace Auckland NZ
2 ACTIVE Greg 14-FEB-2009 13 someplace Sydney AU
3 INACTIVE Dan 29-SEP-2009 14 someplace Auckland NZ
4 NEW ARob 01-JAN-2009 12 someplace Auckland NZ
5 ACTIVE BGreg 14-FEB-2009 13 someplace Sydney AU
6 INACTIVE CDan 29-SEP-2009 14 someplace Auckland NZ
7 NEW DRob 01-JAN-2009 12 someplace Auckland NZ
8 ACTIVE EGreg 14-FEB-2009 13 someplace Sydney AU
9 INACTIVE FDan 29-SEP-2009 14 someplace Auckland NZ