hi,
i have a project which integrates Spring-Hibenate-struts.
i have entities in com.company.entity ...enities like
employee,address,department..etc mapping for tables in oracle DB
one of the entity looks like,
Employee.java
package com.comapany.entity;

import java.io.Serializable;
import java.util.Set;

import com.company.entity.EmployeeAddress;
import com.company.entity.EmployeePhone;

public class Employee {
 private int employeeId;
private String firstName;
private String middleName;
private String lastName;
private String gender;
private String emailID;
...
private Set<EmployeeAddress> employeeAddresses;
..... private Set<EmployeePhone> employeePhones;
 public int getEmployeeId() {
return employeeId;
}
public void setEmployeeId(int employeeId) {
this.employeeId = employeeId;
}

public Set<EmployeeAddress> getEmployeeAddresses() {
return employeeAddresses;
}
public void setEmployeeAddresses(Set<EmployeeAddress> employeeAddresses) {
this.employeeAddresses = employeeAddresses;
}
public Set<EmployeePhone> getEmployeePhones() {
return employeePhones;
}
public void setEmployeePhones(Set<EmployeePhone> employeePhones) {
this.employeePhones = employeePhones;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getMiddleName() {
return middleName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getEmailID() {
return emailID;
}
public void setEmailID(String emailID) {
this.emailID = emailID;
}
....................
}

my application-context.xml looks like,

<?xml version="1.0" encoding="UTF-8" ?>
- <beans xmlns="http://www.springframework.org/schema/beans"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xmlns:context="
http://www.springframework.org/schema/context"; xmlns:aop="
http://www.springframework.org/schema/aop"; xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd";>
///...//

<aop:aspectj-autoproxy />
  <bean id="nullBlocker"
class="com.company.aop.aop2style.annotation.NullBlocker" />
  </beans>

//....//


NullBlocker.java

//imports....
....@aspect
public class NullBlocker {
/*
 @Before("execution(* com.company..*(..))")/
/* not sure abt the execution(...) pattern what i need is it shd exexute
before all the methods start with set* in com.company.entity package in this
package i have .* classes with setters/getters (like
employee,address,department *.java) which sets default values or values from
the form*/
public void nullBlock(JoinPoint joinPoint) {
log.info("Entering " + joinPoint.getSignature().getName() + " method with
arguments "
+ Arrays.toString(joinPoint.getArgs()) );
/*here i need a code to get all the methods starts with *set* from  package
com.comapany*.*entity *with arguments i need to check the args r null r not
*/
}
can you please help me to get the methods with args from particular package

---------------------------
Thanks and regards,
Harish

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to