annotations

@OneToMany and composite primary keys?

Hi, I'm using Hibernate with annotations (in spring), and I have an object which has an ordered, many-to-one relationship which a child object which has a composite primary key, one component of which is a foreign key back to the id of the parent object. The structure looks something like this: +=============+ +=======...

Intercepting method with Spring AOP using only annotations

In my Spring context file I have something like this: <bean id="userCheck" class="a.b.c.UserExistsCheck"/> <aop:config> <aop:aspect ref="userCheck"> <aop:pointcut id="checkUser" expression="execution(* a.b.c.d.*.*(..)) &amp;&amp; args(a.b.c.d.RequestObject)"/> <aop:around pointcut-ref="checkUser" ...

Custom annotations to configure tests

First of al let me start off by saying I think custom annotations can be used for this but i'm not totally sure. I would like to have a set of annotations that I can decorate some test classes with. The annotations would allow me to configure the test for different environments. Example: public class Atest extends BaseTest{ priva...

Best practice to display POI in iPhone's MapKit?

Assuming I have a database of POI with their respective coordinates (longitude & latitude). What would be the "standard" way to display the POI as annotations around the user's current location? To elaborate: Given a zoom level, I guess I have to search through the database for all POI whose distance to the current location < a certain...

MapView Annotation Callout action when opened

Hi, I have a mapview with serveral annotations. Every annotation has a leftCalloutAccessoryView which is a UIViewController class. The reason for this is that I want every annotation to load some data from the server, and add the result of that data to the annotation subTitle. This all works perfectly, except that I dont want to load a...

dynamic html "more information" callout / annotation (jquery? ajax control toolkit?)

Hola, I have an app i'm building in c#, and i'd like to have the ability to have a user click a "more information" icon next to a field, which will then show a callout with some blurb about why the field contains what it does. ideally it'd look a lot like the ValidatorCallout, but instead of being shown as a result of validation, it'll ...

Spring @InitBinder not invoked when showing form => CustomEditors not defined

hi, I have following (simplified to the bone) Controller: @Controller public class TestController { @RequestMapping(value = "/test.htm", method = RequestMethod.GET) public String showForm(final ModelMap map) { final TestFilter filter = new TestFilter(); filter.setStartDate(new Date(System.currentTimeMillis())); map.addA...

Mapping Hashmap of Coordinates in Hibernate with Annotation

I've just started using hibernate and I'm trying to map walking distance between two coordinates into a hashmap, There can be many connections from one "FromCoordinate" to another "ToCoordinate". I'm not sure if i've implemented this correctly, What annotations do i need to map this MashMap? Thanks HashMap> coordWalkingConnections = new...

annotation() and text() in Matlab

Hi, I wonder what is the difference between annotation() and text() functions in Matlab? In what cases, one of them is prefered over the other? Thanks and regards! ...

Counting Java @author annotations per developer

I have a code base where developers use @author annotations on their class definitions. Is there a way for me to be able to programmatically count how many classes are authored by each developer using those annotations? ...

Is it possible to inject a bean into a spring form bean

I tried to do it 2 different ways, but neither way worked. @Component public class EmailForm{ ... private QuestionDAO questionDAO; ... @Autowired public void setQuestionDAO(QuestionDAO questionDAO) { this.questionDAO = questionDAO; } ... Another way: @Component public class EmailForm implements ApplicationContextAware { ......

Strange behaviour of MKMapView.SelectedAnnotations with MonoTouch

In short, my problem is as follows: I am adding somem custom annotations on a MKMapVIew. I want to be able to hide selected annotations when i move the map. To do that, i used the method of intercepting map touches as described here: http://stackoverflow.com/questions/1049889/how-to-intercept-touches-events-on-a-mkmapview-or-uiwebview-o...

Why Hibernates ignores the name attribute of the @Column annotation?

Using Hibernate 3.3.1 and Hibernate Annotations 3.4, the database is DB2/400 V6R1, running that on WebSphere 7.0.0.9 I have the following class @Entity public class Ciinvhd implements Serializable { @Id private String ihinse; @Id @Column(name="IHINV#") private BigDecimal ihinv; .... } For reasons I can't fi...

Google App Engine JDO how to define instance fields ?

I have a class like this : import java.io.*; import java.util.*; public class Contact_Info_Entry implements Serializable { public static final long serialVersionUID=26362862L; String Contact_Id,First_Name="",Last_Name="",Company_Name="",Branch_Name="",Address_1="",Address_2="",City="",State="",Zip="",Country="",E_Mail="",Phone; i...

Status messages on the Spring MVC-based site (annotation controller)

What is the best way to organize status messages ("Your data has been successfully saved/added/deleted") on the Spring MVC-based site using annotation controller? So, the issue is in the way of sending the message from POST-method in contoller. ...

Overlay image/map on MapView?

Okay, hope you can help med here :) I have been searching everywhere to figure this out, but haven't had any luck. I know about Annotations and how to overlay them on a map on the iPhone. But what if I have location like in the forest where there arent any roads or anything. What I am asking is, how can I overlay a custom image (map) ...

GWT and a jaxb objects

I am trying to use GWT to build objects on the client side that would be sent to a web service elsewhere. These objects are generate through JAX-WS which I am pretty sure uses jaxb to build objects from the xsds that are in the wsdl. Anyhow, GWT was supposed to be able to support this by ignoring annotations or whatever, but it isn't...

Parameter attributes in c#

How can I do the following with c# attributes. Below is a snippet of Java that annotates parameters in a constructor. public class Factory { private final String name; private final String value; public Factory(@Inject("name") String name, @Inject("value") String value) { this.name = name; this.value = value;...

Trouble using the Transactional annotation in groovy

Has anyone had any experience with Spring transactions (class-level, with proxy, annotation-driven) not getting started in a Groovy Class? I've been struggling with an unexplained LazyInitialization exception noticed that stacktrace does not include a call to start the transaction. Sounds crazy but I have to wonder whether Groovy picks u...

Output of HPCToolkit

I am using a tool named HPCToolkit to measure the performance of all loops in the program. It looks like it only shows whats causing the performance bottlenecks and not the profiling information for the entire source. Is my understanding correct? ...