Typically, your repository interface will extend
Repository,
CrudRepository or
PagingAndSortingRepository.
Alternatively, if you do not want to extend Spring Data interfaces,
you can also annotate your repository interface with
@RepositoryDefinition
24More
1. Working with Spring Data Repositories - 0 views
-
It allows quick query definition by method names but also custom-tuning of these queries by introducing declared queries as needed.
- ...21 more annotations...
-
The mechanism strips the prefixes find…By, read…By, and get…By from the method and starts parsing the rest of it
-
List<Person> findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname); // Enables the distinct flag for the query List<Person> findDistinctPeopleByLastnameOrFirstname(String lastname, String firstname); List<Person> findPeopleDistinctByLastnameOrFirstname(String lastname, String firstname); // Enabling ignoring case for an individual property List<Person> findByLastnameIgnoreCase(String lastname); // Enabling ignoring case for all suitable properties List<Person> findByLastnameAndFirstnameAllIgnoreCase(String lastname, String firstname); // Enabling static ORDER BY for a query List<Person> findByLastnameOrderByFirstnameAsc(String lastname); List<Person> findByLastnameOrderByFirstnameDesc(String lastname);
-
You can combine property expressions with AND and OR. You also get support for operators such as Between, LessThan, GreaterThan, Like for the property expressions
-
The resolution algorithm starts with interpreting the entire part (AddressZipCode) as the property and checks the domain class for a property with that name (uncapitalized). If the algorithm succeeds it uses that property. If not, the algorithm splits up the source at the camel case parts from the right side into a head and a tail and tries to find the corresponding property, in our example, AddressZip and Code.
-
he infrastructure will recognize certain specific types like Pageable and Sort to apply pagination and sorting to your queries dynamically
-
The first method allows you to pass an org.springframework.data.domain.Pageable instance to the query method to dynamically add paging to your statically defined query. Sorting options are handled through the Pageable instance too
-
Spring is instructed to scan com.acme.repositories and all its subpackages for interfaces extending Repository or one of its subinterfaces. For each interface found, the infrastructure registers the persistence technology-specific FactoryBean to create the appropriate proxies that handle invocations of the query methods. Each bean is registered under a bean name that is derived from the interface name, so an interface of UserRepository would be registered under userRepository
-
This postfix defaults to Impl.Example 1.12. Configuration example<repositories base-package="com.acme.repository" /> <repositories base-package="com.acme.repository" repository-impl-postfix="FooBar" />The first configuration example will try to look up a class com.acme.repository.UserRepositoryImpl to act as custom repository implementation, where the second example will try to lookup com.acme.repository.UserRepositoryFoo
-
To exclude an interface that extends Repository from being instantiated as a repository instance, you can either annotate it with @NoRepositoryBean or move it outside of the configured base-package.
-
]In general, the integration support is enabled by using the @EnableSpringDataWebSupport annotation in your JavaConfig configuration class.
-
In case you need multiple Pageables or Sorts to be resolved from the request (for multiple tables, for example) you can use Spring's @Qualifier annotation to distinguish one from another
-
Spring HATEOAS ships with a representation model class PagedResources that allows enrichting the content of a Page instance with the necessary Page metadata as well as links to let the clients easily navigate the pages.
1More
Creating JEE6 Vaadin Applications - Wiki - vaadin.com - 0 views
-
Special thanks to Piero Sartini who came up with this alternative. It is basically the same as the previous alternative, but it uses the new JEE6 Context and Dependency Injection (CDI) and session scoped beans instead of EJBs. This alternative should have better performance than using EJBs. Instead of annotating the Vaadin application as a stateful session bean, it should be annotated using the @SessionScoped annotation, like so:
1More
shared by Paul Sydney Orozco on 25 Nov 10
- No Cached
Tutorial On Spring with Hibernate and Java Persistence API - 0 views
www.adobocode.com/...ing-with-hibernate-annotations
spring hibernate annotations hbm.xml Entity Table Id Column mysql tutorial
![](/images/link.gif)
-
Sample of using Hibernate Annotations by reducing XML configuration files thus making it simpler to define required metadata directly into our Java code. When using annotations, we no longer need the additional mapping file (*.hbm.xml). The metadata for the ORM is specified in the individual classes.
1More
shared by Paul Sydney Orozco on 25 Nov 10
- No Cached
How to Use @Required Annotation in Spring - 0 views
www.adobocode.com/...-required-annotation-in-spring
Required spring framework java BeanInitializationException bean
![](/images/link.gif)
Quick start with Ehcache Annotations for Spring - 0 views
1More
shared by Paul Sydney Orozco on 25 Nov 10
- No Cached
What's new in Spring 3.0.5 which is now Released - 0 views
www.adobocode.com/...whats-new-in-spring-3-0-5
SpEL Spring Expression Language annotation embedded database
![](/images/link.gif)
151More
Getting Started with RequestFactory - Google Web Toolkit - Google Code - 0 views
-
Entity Proxies
- ...147 more annotations...
-
BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void
-
Methods that return a Request object in the client interface are implemented as static methods on the entity
-
backing store (JDO, JPA, etc.) is responsible for updating the version each time the object is persisted,
-
On the client side, RequestFactory keeps track of objects that have been modified and sends only changes
-
automatically populates bean-style properties between entities on the server and the corresponding EntityProxy on the client,
-
It is not necessary to represent every property and method from the server-side entity in the EntityProxy
1More
shared by DJHell . on 25 May 09
- Cached
Portale und Portlets (4) || IT-Republik - JAXenter - Artikel - 0 views
it-republik.de/...und-Portlets-%284%29-2327.html
jaxenter Artikel Portale Portlets Caching Annotations JSR-286 Portlet 2.0 IT Software-Entwicklung Java
![](/images/link.gif)
-
In den letzten Teilen der Serie wurden bereits viele Neuerungen des JSR-286 vorgestellt und an konkreten Beispielen demonstriert. In diesem Teil wird der Schwerpunkt darauf gelegt, wie die entstandene Ausgabe gecached werden kann, um auch das Thema Performance nicht aus den Augen zu verlieren. Ein Überblick über die Annotation-Unterstützung des JSR-286 rundet die Einführung neuer Features ab.
1More
Articles | OcpSoft - JSF2 | SEO | Bookmarking | Java | Best Practices | Agile - 0 views
-
"The PrettyFaces team is currently working on an alternative way to configure URL mappings. PrettyFaces will soon allow to use annotations instead of the classic XML configuration file to declare mappings. We encourage everyone interested in PrettyFaces to take a look at this new way of configuration and share his or her opinion with us."
1More
Equinox Aspects - 0 views
-
Aspect-oriented computing is continuing to increase in popularity. The modularity inherent in OSGi and Eclipse offers unique opportunities for managing and applying aspects by supplying them in bundles and directing their application to particular sets of bundles. This incubator work area is dedicated to delivering an integration of aspects and OSGi. The goal is to allow developers to use the Equinox together with AspectJ by combining the benefits of both worlds. Using a load-time weaving extension you are able to add AspectJ aspects to your bundle-based system just by putting them into general OSGi bundles. It does not matter if the pointcuts you defined inside the aspects contain join points that are defined by classes within the same bundle or any other bundle in your installation. The load-time weaving extension will take care that your aspects are woven with the appropriate classes at load-time. To illustrate this lets assume the following situation: You would like to write an aspect that traces something within the JDT plug-ins of Eclipse. Without some kind of load-time aspect weaving you would somehow need to recompile those JDT plug-ins using AJDT (for example) together with your aspect. By using the load-time aspect weaving extension all you need is to implement your aspect and add that bundle to your system. The load-time aspect weaving extension takes care of weaving your aspect with the JDT code as it is loaded. And it doesn't matter if a new JDT is installed by the user later on. The next time your application is started the load-time aspect weaving will take care of weaving your aspect into these bundles as well, if necessary. With this technology is becomes possible to modularize crosscutting concerns across different plug-ins while keeping the idea of separate compilation for bundles. Goals Provide Runtime Modularity and Versioning for Crosscutting Concerns: Aspects are used to implement crosscutting concerns. However such concerns usually compr
Concurrency is hot, try the JCIP annotations | JetBrains Zone - 0 views
jetbrains.dzone.com/...concurrency-hot-try-jcip
idea concurrency annotations jcip java development programming
![](/images/link.gif)
19More
untitled - 0 views
-
initWidget(uiBinder.createAndBindUi(this));
-
GWT compiler won't actually visit this URL to fetch the file, because a copy of it is baked into the compiler
- ...15 more annotations...
-
public class UserDashboard extends Composite { interface MyUiBinder extends UiBinder<Widget, UserDashboard> {} private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); public UserDashboard() { initWidget(uiBinder.createAndBindUi(this)); }}
1More
shared by Hendy Irawan on 26 Dec 10
- Cached
Apache CXF -- Index - 0 views
cxf.apache.org
java opensource framework apache cxf webservice webservices SOA soap axis axis2 xml web
![](/images/link.gif)
-
Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI. CXF includes a broad feature set, but it is primarily focused on the following areas: Web Services Standards Support: CXF supports a variety of web service standards including SOAP, the WS-I Basic Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy, WS-SecureConverstation, and WS-Trust (partial). Frontends: CXF supports a variety of "frontend" programming models. CXF implements the JAX-WS APIs (TCK compliant). CXF JAX-WS support includes some extensions to the standard that make it significantly easier to use, compared to the reference implementation: It will automatically generate code for request and response bean classes, and does not require a WSDL for simple cases. It also includes a "simple frontend" which allows creation of clients and endpoints without annotations. CXF supports both contract first development with WSDL and code first development starting from Java. For REST, CXF also supports a JAX-RS (TCK compliant) frontend. Ease of use: CXF is designed to be intuitive and easy to use. There are simple APIs to quickly build code-first services, Maven plug-ins to make tooling integration easy, JAX-WS API support, Spring 2.x XML support to make configuration a snap, and much more. Binary and Legacy Protocol Support: CXF has been designed to provide a pluggable architecture that supports not only XML but also non-XML type bindings, such as JSON and CORBA, in combination with any type of transport. To get started using CXF, check out the downloads, the user's guide, or the mailing lists to get more information!
1More
Texo - Eclipsepedia - 0 views
-
"Texo provides JPA annotations, model and template driven development technology powered by EMF for web application (WAR) development projects. Texo uses components currently present in the Eclipse Modeling Framework (EMF) and Eclipse Modeling Framework Technology (EMFT) projects. Texo is a proposed open source component in the Eclipse Modeling Framework Technology (EMFT) project. "
1More
Apache Felix - Apache Felix iPOJO - 0 views
-
iPOJO is a service component runtime aiming to simplify OSGi application development. It natively supports ALL the dynamism of OSGi. Based on the concept of POJO, application logic is developed easily. Non-functional properties are just injected in the component at runtime. iPOJO strength points are : components are developed as POJO, nothing else is required ! the component model is extensible, so feel free to adapt it to your needs the standard component model manages service providing and service dependencies, and so can require any other OSGi services iPOJO manages the component instance lifecycle and the environment dynamics as it has never been possible iPOJO provides a powerful composition system to create highly dynamic applications iPOJO supports annotations, XML or Java-based API to define the component
1More
jmockit - A capable and elegant developer mock testing toolkit for Java - Google Projec... - 0 views
-
"JMockit allows developers to write unit/integration tests without the testability issues typically found with other mocking APIs. Tests can easily be written that will mock final classes, static methods, constructors, and so on. There are no limitations. The JMockit mocking API is simple, consistent, and minimal. There are no special methods or annotations that need to be used in test code, apart from those that really make sense. In general, the use of JMockit APIs for mocking leads to test code that is better structured and more readable. "
1More
shared by Paul Sydney Orozco on 25 Nov 10
- No Cached
How to Add CRUD Capability On Spring MVC using Hibernate JPA - 0 views
www.adobocode.com/...-crud-capability-to-spring-mvc
crud create read update delete spring mvc hibernate jpa saving editing mysql annotation
![](/images/link.gif)
96More
Large scale application development and MVP - Part II - Google Web Toolkit - Google Code - 0 views
-
itself
- ...91 more annotations...
-
contactsView.setColumnDefiniions(
-
columnDefinitions = new ArrayList<ColumnDefinition<ContactDetails>>()
-
Inefficiencies related to inserting new elements via DOM manipulation Overhead associated with sinking events per Widget