[JBoss JIRA] (FORGE-1179) Port the Bean validation commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1179?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1179.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.0.0.Alpha13
(was: 2.0.0.Final)
Resolution: Done
Fixed
> Port the Bean validation commands
> ---------------------------------
>
> Key: FORGE-1179
> URL: https://issues.jboss.org/browse/FORGE-1179
> Project: Forge
> Issue Type: Sub-task
> Components: Builtin Plugins
> Reporter: Vineet Reynolds
> Assignee: George Gastaldi
> Fix For: 2.0.0.Alpha13
>
> Attachments: 2013-09-12 16.05.bmml, 2013-09-12 16.05.png
>
>
> Commands in Forge 1:
> * validation setup
> * constraint Valid
> * constraint Null
> * constraint NotNull
> * constraint AssertTrue
> * constraint AssertFalse
> * constraint MinConstraint
> * constraint MaxConstraint
> * constraint DecimalMin
> * constraint DecimalMax
> * constraint Size
> * constraint Digits
> * constraint Past
> * constraint Future
> * constraint Pattern
> * remove-constraint <default_command>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (FORGE-1201) getSearchPredicates should use case insensitive search
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1201:
----------------------------------------
Summary: getSearchPredicates should use case insensitive search
Key: FORGE-1201
URL: https://issues.jboss.org/browse/FORGE-1201
Project: Forge
Issue Type: Feature Request
Affects Versions: 1.4.0.Final
Reporter: Antonio Goncalves
Hi,
When you do JSF scaffolding, the generated code for research is as follow :
{code}
private Predicate[] getSearchPredicates(Root<Talk> root) {
CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();
List<Predicate> predicatesList = new ArrayList<>();
String title = this.example.getTitle();
if (title != null && !"".equals(title)) {
predicatesList.add(builder.like(root.<String>get("title"), '%' + title + '%'));
}
{code}
The problem with that is the search is case sensitive and searching for "java" or "Java" doesn't bring the same results. It would be more natural to have case insensitive search as follow :
{code}
private Predicate[] getSearchPredicates(Root<Talk> root) {
CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();
List<Predicate> predicatesList = new ArrayList<>();
String title = this.example.getTitle();
if (title != null && !"".equals(title)) {
predicatesList.add(builder.like(builder.lower(root.<String>get("title")), "%" + title.toLowerCase() + "%"));
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (FORGE-1200) Add A@Column(length) on Entity attributes of type String
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1200?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1200.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 1.4.1.Final
2.0.0.Alpha13
(was: 2.x Future)
Resolution: Done
Fixed
> Add A@Column(length) on Entity attributes of type String
> ---------------------------------------------------------
>
> Key: FORGE-1200
> URL: https://issues.jboss.org/browse/FORGE-1200
> Project: Forge
> Issue Type: Feature Request
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.4.1.Final, 2.0.0.Alpha13
>
>
> It would be good to be able to set the length of a string on an entity. If you do :
> {code}
> field string --named title ;
> constraint Size --onProperty title --max 2000
> {code}
> You will get :
> {code}
> @Column
> @Size(max = 2000)
> private String title;
> {code}
> Even in Java EE 7, the integration between JPA and Bean Validation hasn't been made. So this doesn't create a column in the DB with 2000 char long. What you would need is :
> {code}
> @Column(length = 2000)
> @Size(max = 2000)
> private String title;
> {code}
> It would be good to have extra length parameter, something like :
> {code}
> field string --named title --length 2000;
> {code}
> See : http://lists.jboss.org/pipermail/forge-dev/2012-December/002878.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (FORGE-1200) Add A@Column(length) on Entity attributes of type String
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1200?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1200:
-----------------------------------
Fix Version/s: 2.x Future
Affects Version/s: (was: 2.x Future)
> Add A@Column(length) on Entity attributes of type String
> ---------------------------------------------------------
>
> Key: FORGE-1200
> URL: https://issues.jboss.org/browse/FORGE-1200
> Project: Forge
> Issue Type: Feature Request
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be good to be able to set the length of a string on an entity. If you do :
> {code}
> field string --named title ;
> constraint Size --onProperty title --max 2000
> {code}
> You will get :
> {code}
> @Column
> @Size(max = 2000)
> private String title;
> {code}
> Even in Java EE 7, the integration between JPA and Bean Validation hasn't been made. So this doesn't create a column in the DB with 2000 char long. What you would need is :
> {code}
> @Column(length = 2000)
> @Size(max = 2000)
> private String title;
> {code}
> It would be good to have extra length parameter, something like :
> {code}
> field string --named title --length 2000;
> {code}
> See : http://lists.jboss.org/pipermail/forge-dev/2012-December/002878.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (FORGE-1200) Add A@Column(length) on Entity attributes of type String
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1200:
----------------------------------------
Summary: Add A@Column(length) on Entity attributes of type String
Key: FORGE-1200
URL: https://issues.jboss.org/browse/FORGE-1200
Project: Forge
Issue Type: Feature Request
Affects Versions: 2.x Future
Reporter: Antonio Goncalves
It would be good to be able to set the length of a string on an entity. If you do :
{code}
field string --named title ;
constraint Size --onProperty title --max 2000
{code}
You will get :
{code}
@Column
@Size(max = 2000)
private String title;
{code}
Even in Java EE 7, the integration between JPA and Bean Validation hasn't been made. So this doesn't create a column in the DB with 2000 char long. What you would need is :
{code}
@Column(length = 2000)
@Size(max = 2000)
private String title;
{code}
It would be good to have extra length parameter, something like :
{code}
field string --named title --length 2000;
{code}
See : http://lists.jboss.org/pipermail/forge-dev/2012-December/002878.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1199:
-----------------------------------
Fix Version/s: 1.x Future
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Affects Versions: 1.4.0.Final
> Reporter: Luca Masini
> Fix For: 1.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months