Added cross references, cleaned the persistence config, added default
tab view for Article and order.
This commit is contained in:
@@ -1,19 +1,23 @@
|
|||||||
# Module
|
# Module
|
||||||
Article.module=Artikel
|
Article.module=Artikel
|
||||||
Brand.module=Marken
|
Brand.module=Marken
|
||||||
Condition.module=Zustand
|
Condition.module=Zustand
|
||||||
Pattern.module=Muster
|
Pattern.module=Muster
|
||||||
Size.module=Gr<EFBFBD><EFBFBD>en
|
Size.module=Gr<EFBFBD><EFBFBD>en
|
||||||
Category.module=Kategorien
|
Category.module=Kategorien
|
||||||
|
|
||||||
# Fields
|
# Fields
|
||||||
buyPrice=Einkaufspreis
|
buyPrice=Einkaufspreis
|
||||||
sellPrice=Verkaufspreis
|
sellPrice=Verkaufspreis
|
||||||
originalPrice=Originalpreis
|
originalPrice=Originalpreis
|
||||||
buyAndSell=Kaufen und Verkaufen
|
buyAndSell=Kaufen und Verkaufen
|
||||||
buyDate=Kaufdatum
|
buyDate=Kaufdatum
|
||||||
sellDate=Verkaufsdatum
|
sellDate=Verkaufsdatum
|
||||||
pattern=Muster
|
pattern=Muster
|
||||||
brand=Marke
|
brand=Marke
|
||||||
condition=Zustand
|
condition=Zustand
|
||||||
size=Gr<EFBFBD><EFBFBD>e
|
size=Gr<EFBFBD><EFBFBD>e
|
||||||
|
|
||||||
|
# ???
|
||||||
|
Cards=Karten
|
||||||
|
and=und
|
||||||
@@ -8,22 +8,15 @@
|
|||||||
|
|
||||||
<persistence-unit name="default">
|
<persistence-unit name="default">
|
||||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||||
|
<non-jta-data-source>java://comp/env/jdbc/BabydatenbankDS</non-jta-data-source>
|
||||||
<class>org.openxava.session.GalleryImage</class>
|
<class>org.openxava.session.GalleryImage</class>
|
||||||
<class>org.openxava.web.editors.DiscussionComment</class>
|
<class>org.openxava.web.editors.DiscussionComment</class>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="javax.persistence.schema-generation.database.action" value="update"/>
|
<property name="hibernate.default_catalog" value="admin_babydatenbank"/>
|
||||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL8Dialect" />
|
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL8Dialect" />
|
||||||
<property name="javax.persistence.create-database-schemas" value="true"/>
|
<property name="javax.persistence.create-database-schemas" value="true"/>
|
||||||
<property name="hibernate.default_catalog" value="admin_babydatenbank"/>
|
|
||||||
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
|
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
|
||||||
<property name="hibernate.connection.driver_class" value="com.mysql.cj.jdbc.Driver"/>
|
<property name="javax.persistence.schema-generation.database.action" value="update"/>
|
||||||
<property name="hibernate.connection.username" value="babydatenbank_usr" />
|
|
||||||
<property name="hibernate.connection.password" value="mJq63*n1" />
|
|
||||||
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/admin_babydatenbank?serverTimezone=Europe/Berlin&useUnicode=true&characterEncoding=UTF-8"/>
|
|
||||||
<property name="hibernate.connection.charSet" value="UTF-8" />
|
|
||||||
<property name="hibernate.connection.characterEncoding" value="UTF-8" />
|
|
||||||
<property name="hibernate.connection.useUnicode" value="true" />
|
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
|
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ smtpStartTLSEnable=false
|
|||||||
# This affects only if Java logging is used (usually in Tomcat and WebSphere).
|
# This affects only if Java logging is used (usually in Tomcat and WebSphere).
|
||||||
# It does not affect log4j configuration (usually in JBoss or if you use log4j in your app).
|
# It does not affect log4j configuration (usually in JBoss or if you use log4j in your app).
|
||||||
# Default value is INFO
|
# Default value is INFO
|
||||||
javaLoggingLevel=FINE
|
javaLoggingLevel=WARNING
|
||||||
|
|
||||||
# LOGGING LEVEL FOR HIBERNATE ENGINE
|
# LOGGING LEVEL FOR HIBERNATE ENGINE
|
||||||
# Possibles values are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF
|
# Possibles values are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF
|
||||||
# Default value is INFO
|
# Default value is INFO
|
||||||
#hibernateJavaLoggingLevel=FINEST
|
hibernateJavaLoggingLevel=WARNING
|
||||||
|
|
||||||
# help
|
# help
|
||||||
#helpAvailable=false
|
#helpAvailable=false
|
||||||
|
|||||||
@@ -18,11 +18,12 @@ import java.time.*;
|
|||||||
"#buyDate, sellDate];" +
|
"#buyDate, sellDate];" +
|
||||||
"remarks"
|
"remarks"
|
||||||
)
|
)
|
||||||
|
@Tab(properties="name, photo, category.description, brand.description, pattern.description, size.description, condition.description, remarks", defaultOrder="${name} asc")
|
||||||
public class Article {
|
public class Article {
|
||||||
|
|
||||||
@Id @Hidden @GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
@Id @Hidden @GeneratedValue(generator="system-uuid2") // Universally Unique Identifier (1)
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
@Column(length=32)
|
@Column(length=36)
|
||||||
private String oid;
|
private String oid;
|
||||||
|
|
||||||
@Column(length=32)
|
@Column(length=32)
|
||||||
@@ -42,7 +43,7 @@ public class Article {
|
|||||||
@DescriptionsList
|
@DescriptionsList
|
||||||
private Pattern pattern;
|
private Pattern pattern;
|
||||||
|
|
||||||
@ManyToOne(optional=true, fetch = FetchType.EAGER)
|
@ManyToOne
|
||||||
@NoModify
|
@NoModify
|
||||||
@DescriptionsList
|
@DescriptionsList
|
||||||
private Category category;
|
private Category category;
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ public class Brand {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Hidden
|
@Hidden
|
||||||
@GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
@GeneratedValue(generator="system-uuid2") // Universally Unique Identifier (1)
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
@Column(length=32)
|
@Column(length=36)
|
||||||
private String oid;
|
private String oid;
|
||||||
|
|
||||||
@Column(length=20)
|
@Column(length=20)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@OneToMany(mappedBy="brand", fetch = FetchType.EAGER)
|
@OneToMany(mappedBy="brand")
|
||||||
@ListProperties("name, category.description")
|
@ListProperties("name, category.description, pattern.description, size.description, condition.description")
|
||||||
private Collection<Article> articles;
|
private Collection<Article> articles;
|
||||||
|
|
||||||
public String getOid() {
|
public String getOid() {
|
||||||
|
|||||||
@@ -1,37 +1,50 @@
|
|||||||
package com.yourcompany.babydatenbank.model;
|
package com.yourcompany.babydatenbank.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
import java.util.*;
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
import org.openxava.annotations.*;
|
import org.openxava.annotations.*;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class Category {
|
public class Category {
|
||||||
@Id
|
@Id
|
||||||
@Hidden
|
@Hidden
|
||||||
@GeneratedValue(generator="system-uuid")
|
@GeneratedValue(generator="system-uuid2")
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
@Column(length=32)
|
@Column(length=36)
|
||||||
private String oid;
|
private String oid;
|
||||||
|
|
||||||
@Column(length=20)
|
@Column(length=20)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
public String getDescription() {
|
@OneToMany(mappedBy="category")
|
||||||
return description;
|
@ListProperties("name, brand.description, pattern.description, size.description, condition.description")
|
||||||
}
|
private Collection<Article> articles;
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public String getDescription() {
|
||||||
this.description = description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOid() {
|
public void setDescription(String description) {
|
||||||
return oid;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOid(String oid) {
|
public String getOid() {
|
||||||
this.oid = oid;
|
return oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOid(String oid) {
|
||||||
}
|
this.oid = oid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Article> getArticles() {
|
||||||
|
return articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArticles(Collection<Article> articles) {
|
||||||
|
this.articles = articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,46 +1,46 @@
|
|||||||
package com.yourcompany.babydatenbank.model;
|
package com.yourcompany.babydatenbank.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
import org.openxava.annotations.*;
|
import org.openxava.annotations.*;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class Condition {
|
public class Condition {
|
||||||
@Id
|
@Id
|
||||||
@Hidden
|
@Hidden
|
||||||
@GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
@GeneratedValue(generator="system-uuid2")
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
@Column(length=32)
|
@Column(length=36)
|
||||||
private String oid;
|
private String oid;
|
||||||
|
|
||||||
@Column(length=4)
|
@Column(length=4)
|
||||||
private int number;
|
private int number;
|
||||||
|
|
||||||
@Column(length=32)
|
@Column(length=32)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
public String getOid() {
|
public String getOid() {
|
||||||
return oid;
|
return oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOid(String oid) {
|
public void setOid(String oid) {
|
||||||
this.oid = oid;
|
this.oid = oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumber() {
|
public int getNumber() {
|
||||||
return this.number;
|
return this.number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumber(int number) {
|
public void setNumber(int number) {
|
||||||
this.number = number;
|
this.number = number;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +1,51 @@
|
|||||||
package com.yourcompany.babydatenbank.model;
|
package com.yourcompany.babydatenbank.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
import org.openxava.annotations.*;
|
import org.openxava.annotations.*;
|
||||||
|
import java.util.*;
|
||||||
@Entity
|
|
||||||
public class Pattern {
|
@Entity
|
||||||
|
public class Pattern {
|
||||||
@Id
|
|
||||||
@Hidden
|
@Id
|
||||||
@GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
@Hidden
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GeneratedValue(generator="system-uuid2") // Universally Unique Identifier (1)
|
||||||
@Column(length=32)
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
private String oid;
|
@Column(length=36)
|
||||||
|
private String oid;
|
||||||
@Column(length=20)
|
|
||||||
private String description;
|
@Column(length=20)
|
||||||
|
private String description;
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
@OneToMany(mappedBy="pattern")
|
||||||
}
|
@ListProperties("name, brand.description, category.description, size.description, condition.description")
|
||||||
|
private Collection<Article> articles;
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
public String getDescription() {
|
||||||
}
|
return description;
|
||||||
|
}
|
||||||
public String getOid() {
|
|
||||||
return oid;
|
public void setDescription(String description) {
|
||||||
}
|
this.description = description;
|
||||||
|
}
|
||||||
public void setOid(String oid) {
|
|
||||||
this.oid = oid;
|
public String getOid() {
|
||||||
}
|
return oid;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public void setOid(String oid) {
|
||||||
|
this.oid = oid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Article> getArticles() {
|
||||||
|
return articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArticles(Collection<Article> articles) {
|
||||||
|
this.articles = articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
package com.yourcompany.babydatenbank.model;
|
package com.yourcompany.babydatenbank.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import org.openxava.annotations.*;
|
import org.openxava.annotations.*;
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class Size {
|
public class Size {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Hidden
|
@Hidden
|
||||||
@GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
@GeneratedValue(generator="system-uuid2") // Universally Unique Identifier (1)
|
||||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
@GenericGenerator(name="system-uuid2", strategy = "uuid2")
|
||||||
@Column(length=32)
|
@Column(length=36)
|
||||||
private String oid;
|
private String oid;
|
||||||
|
|
||||||
@Column(length=20)
|
@Column(length=20)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOid() {
|
public String getOid() {
|
||||||
return oid;
|
return oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOid(String oid) {
|
public void setOid(String oid) {
|
||||||
this.oid = oid;
|
this.oid = oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<Resource name="jdbc/BabydatenbankDS" auth="Container" type="javax.sql.DataSource"
|
<Resource name="jdbc/BabydatenbankDS" auth="Container" type="javax.sql.DataSource"
|
||||||
maxTotal="20" maxIdle="5" maxWaitMillis="10000"
|
maxTotal="20" maxIdle="5" maxWaitMillis="10000"
|
||||||
username="babydatenbank_usr" password="mJq63*n1" driverClassName="com.mysql.cj.jdbc.Driver"
|
username="babydatenbank_usr" password="mJq63*n1" driverClassName="com.mysql.cj.jdbc.Driver"
|
||||||
url="jdbc:mysql://localhost:3306/admin_babydatenbank?serverTimezone=Europe/Berlin&useUnicode=true&characterEncoding=UTF-8"/>
|
url="jdbc:mysql://localhost:3306/?serverTimezone=Europe/Berlin&useUnicode=true&characterEncoding=UTF-8"/>
|
||||||
|
|
||||||
<!-- PostgreSQL
|
<!-- PostgreSQL
|
||||||
<Resource name="jdbc/BabydatenbankDS" auth="Container" type="javax.sql.DataSource"
|
<Resource name="jdbc/BabydatenbankDS" auth="Container" type="javax.sql.DataSource"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user