Object Services, or bridging anemic and rich models, in CDI/Weld @ Blog of Adam Warski - 1 views
-
Object Services, or bridging anemic and rich models, in CDI/Weld
Extending the security interceptor for Weld/JSF2 @ Blog of Adam Warski - 1 views
-
Extending the security interceptor for Weld/JSF2
-
simple security interceptor, which checks conditions defined
-
using EL expressions
Introduction - 0 views
Generic Range Class | Java.net - 0 views
AuthorizingRealm (Apache Shiro 1.2.1 API) - 0 views
-
perform all role and permission checks automatically
-
getAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection) method returns an AuthorizationInfo
-
subclasses do not have to write this logic
- ...11 more annotations...
http://www.jroller.com/RickHigh/entry/don_t_repeat_the_dao - 0 views
-
Don't repeat the DAO... JPA Remix
Cyrille Martraire » The untold art of Composite-friendly interfaces - 0 views
[Debate] - And what about configuration in Java EE 7 ? « Antonio's Blog - 0 views
JPA implementation patterns: Wrap-up | Xebia Blog - 0 views
-
JPA implementation patterns
Confluence 101: Trade Your Inbox for WorkBox | Atlassian Blogs - 0 views
Confluence 101: Keep Your Team On-Track with Tasks | Atlassian Blogs - 0 views
-
Confluence 101: Keep Your Team On-Track with Tasks
-
Confluence 101: Keep Your Team On-Track with Tasks
-
Confluence 101: Keep Your Team On-Track with Tasks
- ...4 more annotations...
3 ways to serialize Java Enums | Vineet Manohar's blog - 0 views
-
Mapping enum to database column using JPA/Hibernate You can use any of the 3 approaches discussed above. Map the enum to an integer column. The persistence implementation should automatically convert enum to ordinal() and back for you. Map the enum to a String column. The persistence implementation should automatically convert the enum value to String value via the name() function. Map the enum using a business value. You should mark the enum field as @Transient, and create another String field which you can map to a String column in your database table. Here’s an example code snippet. view plaincopy to clipboardprint?@Entity public class Product { @Column private String colorValue; @Transient public Color getColor() { return Color.fromValue(colorValue); } public void setColor(Color color) { this.colorValue = color.toValue(); } }
-
Approach 3: Using a user defined business value – Recommended approach! This approach involves assigning a an explicit user defined value to each enum constant and defining a toValue() and fromValue() methods on the enum to do the serialization and deserialization.
-
public enum Color { RED("RED"), GREEN("GREEN"), BLUE("BLUE"), UNKNOWN("UNKNOWN"); private final String value; Color(String value) { this.value = value; } public static Color fromValue(String value) { if (value != null) { for (Color color : values()) { if (color.value.equals(value)) { return color; } } } // you may return a default value return getDefault(); // or throw an exception // throw new IllegalArgumentException("Invalid color: " + value); } public String toValue() { return value; } public static Color getDefault() { return UNKNOWN; } } public enum Color { RED("RED"), GREEN("GREEN"), BLUE("BLUE"), UNKNOWN("UNKNOWN"); private final String value; Color(String value) { this.value = value; } public static Color fromValue(String value) { if (value != null) { for (Color color : values()) { if (color.value.equals(value)) { return color; } } } // you may return a default value return getDefault(); // or throw an exception // throw new IllegalArgumentException("Invalid color: " + value); } public String toValue() { return value; } public static Color getDefault() { return UNKNOWN; } } This approach is better than approach 1 and approach 2 above. It neither depends on the order in which the enum constants are declared nor on the constant names.
Java 5 EnumUserType | Hibernate | JBoss Community - 0 views
-
Java 5 EnumUserType
Scrum Alliance - PMPs versus Agile Project Managers: Clash of the Titans - 0 views
Agile Alliance Article Categories - 0 views
BR Management - Organization - Projects - Confluence - 0 views
-
BR Management - Organization
Home - JIRA Linker Plugin - Confluence - 0 views
-
Configuring custom Confluence servers
-
Download and save atlassian-jira-linker-plugin.properties
-
confluence.urls
- ...5 more annotations...
« First
‹ Previous
341 - 360 of 1272
Next ›
Last »
Showing 20▼ items per page