annotations

Spring: controller inheritance using @Controller annotation

I'd like to be able to create a base controller in my Spring app that, among other things, determines if a user is a registered user or not. This base controller, following the template design pattern, would contain an abstract protected method that controller subclasses would implement. The abstract method would have passed to it an ...

What is annotation processing in Java?

Quoting, Sun's Official Java Tutorial Class names, 'HelloWorldApp', are only accepted if annotation processing is explicitly requested What does it mean? And how to apply it? ...

Java APT how to break a maven1 build when some apt condition are true

I have an APT processor that display warnings on some conditions. My project is using a maven1 build calling ant:apt How to make maven fails when warning conditions are met ? (the processor can be modified) Thanks. ...

Why does JPA have a @Transient annotation?

Java has the transientkeyword. Why does JPA have @Transient instead of simply using the already existing java keyword? ...

Confused about how java annotations (ie @SecurityDomain) work and what they do (do they generate xml? wsdl?)

I have to admit that I am pretty confused how annotations work in java (SOAP) webservices. What does adding a tag do? I think that maybe adding a tag generates some xml or maybe a wsdl? When I build should I see a difference in those files? Any description or link would be great. I have done a lot of searching but I think maybe ...

In which release did Java Data Objects (JDO) first start allowing annotations as an alternative to XML?

My understanding is that the original incarnation of JDO required the use of XML files to describe the metadata but I see that the most recent version allows annotations. Is this correct? If so, when did annotations first become available in JDO as an alternative to XML? ...

C#: enforceable way of signifying a method is there as part of interface

Is there a way in C# to mark a method as being part of a class to satisfy an interface that the class implements? I find myself wondering sometimes when digging in a class's code why some methods are there but then, when I try to remove one since it isn't in use, I see it's necessary in order for the class to implement some interface. ...

JBOSS webservice annotations.

Background I am attempting to make a webservice using SOAP and JBOSS. I know that to make a webservice that you do something like this: import javax.jws.WebService; @WebService public class HelloImpl { /** * @param name * @return Say hello to the person. */ public String sayHello(String name) { return "Hello, " + ...

Open file in Adobe Acrobat then save back to website with Acrobat save button

I'm sure this isn't possible but figured I'd check -- Using Adobe, is there a way to open a PDF from a webpage. The PDF would then be viewed and marked up if necessary. Then, the user would click the built-in Adobe 'SAVE' button and the pdf would be sent back to the server. I'm sure it's a long shot that this is built into adobe, but ...

Do we need the visitor for annotation processing in java 6?

I searched for examples which may answer my question, but can't find any useful or complet ones... Thanks in advance ...

How to get Eclipse to show Javadoc for javax annotations

I really like the way Eclipse has pop-up Javadoc documentation for the various Java library classes I use. However, I also use JPA and JAXB annotations such as @Entity and @XMLType. Eclipse recognises these as valid because I can hit ctrl-space and they pop-up. I also get Javadoc for javax classes. But there is no Javadoc for these a...

Can you specialize inherited Java annotations

I have an abstract superclass that has JPA annotations on it mapping some of its fields. The class itself has the @MappedSuperclass annotation. Can I specialize/add or change just one element of an inherited annotation without re-specifying the entire annotation? ...

Best way to add annotations to inherited methods

I have a number of abstract superclasses from which my concrete class inherit various methods. Some of these methods need to have JPA or JAXB annotations placed on them in the concrete class. Currently I do this via the following: @MyLocalAnnotations @Override public method inheritedMethodHere (yadda yadda) { super.inheritedMethod...

Adding thumbnails to google custom search results?

I would like to add thumbnails to my custom search results page, I guess it is possible since I've seen it on other sites using cse but I've had no luck searching google for it. Thanks EDIT I've also looked into adding microformats to pages but it is not showing images although it is running fine in Rich Snippets Testing Tool(but is stil...

iPhone mapView / mapKit using removeAnnotation & addAnnotation results in memory leak?

To update the location of a GPS indicator on mapView... [mapView removeAnnotation:myGpsAnnotation]; [myGpsAnnotation release]; myGpsAnnotation = nil; myGpsAnnotation = [[MapLocationAnnotation alloc] initWithCoordinate:region.center annotationType:MapAnnotationTypeGps title:MAP_ANNOTATION_TYPE_GPS]; [mapView addAnnotation:myGpsAnnotation...

JAX-RS Element name for return type Collection

I have a situation where the method signature of JAX-RS service looks like... public Collection<CustomerData> getCustomers() { ... } The xml generated has the root tag like customerDatas as below <customerDatas><customer>.....</customer></customerDatas> I am using JAXB annotations and root element name for CustomerData is custom...

How to check for a length of 5 or 9 with hibernate validator?

I can validate the length of a String with an annotation like: @Length(max = 255) But what if I want to verifiy that the length is either 5 or 9? Can this be done with an annotation? ...

Cyclic serialisation with Many to Many relationship with Hibernate.

I have a parent (Program) pojo with a many-to-many relationship with their children (Subscriber). The problem is when it serialises a Program, it also serialises the Program's Subscribers, which involves serialising their Programs, which involves serialising their Subscribers, until it has serialised every single Program & Subscriber in...

Spring MVC 3.0: how do I define an interceptor with annotations?

I am developing an app with Spring MVC (3.0). I defined some controllers with annotations, how can I define an intereceptor with annotations too. ...

member variable setting back

Hello i have a problem, i have a app with two views (one mapView with pins) and one View with textfields with datas of the pushed pin. If i click on a pin it works very good, but if i go back and click another pin, there are allways the datas of the first pin i clicked? - (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotation...