我在网上看了几个东西,但它对我来说就像希腊语。 例如: jackson disable fail_on_empty_beans 似乎没有任何事情与非wadl一代的麻烦有关。
我确实在本地运行了一个休息服务,安装在Tomcat服务器上。 随着服务的成长,我决定使用泽西技能来获得一个wadl。
但是当我试着拨打以下地址时,我发现了一个错误
http://localhost:9090/android-rest-0.0.5-SNAPSHOT/application.wadl
(也在服务器上试过)
我非常害怕整合包装,尤其是其他工作正常。
有人可以帮我解释一下如何让我的wadl产生?
com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:59)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:26)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:809)
at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:684)
at com.myc.android.rest.util.LoggingResponseFilter.filter(LoggingResponseFilter.java:27)
at org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:231)
at org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:196)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:379)
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:371)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:262)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:361)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:751)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:566)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
at org.eclipse.jetty.server.Server.handle(Server.java:461)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
at java.lang.Thread.run(Thread.java:745)
Web.xml中
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>PLRWA</display-name>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>jersey-serlvet</servlet-name>
<servlet-class>
org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.myc.android.rest.service.RegisterApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jersey-serlvet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<resource-ref>
<description>Database resource for RS </description>
<res-ref-name>jdbc/restDemoDBOracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
我的POM文件如下
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.myc</groupId>
<artifactId>android-rest</artifactId>
<version>0.0.5-SNAPSHOT</version>
<packaging>war</packaging>
<name>DemoRestWS</name>
<description>REST web services monté avec spring, jersey et jpa2/hibernate pour android</description>
<properties>
<spring.version>3.2.6.RELEASE</spring.version>
<hibernate.version>4.2.7.Final</hibernate.version>
<jetty.version>9.2.0.RC0</jetty.version> <!-- Adapt this to a version found on http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/ -->
<logback.version>1.1.1</logback.version>
<jcloverslf4j.version>1.7.6</jcloverslf4j.version>
</properties>
<repositories>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.3</version>
</dependency>
<!-- Jersey-Spring http://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-spring3/2.4.1 -->
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring3</artifactId>
<version>2.4</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.4.1</version>
</dependency>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Oracle JDBC connector -->
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
<scope>provided</scope>
</dependency>
<!-- tomcat jdbc -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>7.0.35</version>
<scope>provided</scope>
</dependency>
<!-- ******* JPA/Hibernate ******** -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
<!-- testing -->
<!-- Jersey-client -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.1.0</version>
<exclusions>
<!-- Exclude Groovy because of classpath issue -->
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-external</artifactId>
<version>2.5.1</version>
</dependency>
<!-- LogBack dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${jcloverslf4j.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<jettyConfig>${project.basedir}/src/main/resources/config/jetty9.xml</jettyConfig>
<stopKey>STOP</stopKey>
<stopPort>9999</stopPort>
<stopWait>5</stopWait>
<scanIntervalSeconds>5</scanIntervalSeconds>
<scanTargets>
<scanTarget>${project.basedir}/src/main</scanTarget>
<scanTarget>${project.basedir}/src/test</scanTarget>
</scanTargets>
<contextXml>${project.basedir}/src/test/resources/jetty-context.xml</contextXml>
<webAppConfig>
<contextPath>/${project.artifactId}-${project.version}</contextPath>
</webAppConfig>
</configuration>
<dependencies>
<!--<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.27</version>
</dependency>
-->
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-exploded</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
已添加:服务及其他人
@Component
@Path("/kit")
public class KitRestService {
@Autowired
private KitDao kitDao;
/************************************ READ ************************************/
@GET
@Path("/getMagasinKit")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public Response getMagasinKit(@QueryParam("kit") Integer kit,@QueryParam("sitegeo") String sitegeo) throws JsonGenerationException, JsonMappingException, IOException {
List<String> magasinkit= kitDao.getMagasinKit(kit, sitegeo);
return Response.ok(magasinkit).header("Access-Control-Allow-Origin", "*").build();
}
}
KitDaoJPA2Impl (KitDao是公共界面)
public class KitDaoJPA2Impl implements KitDao {
private static final Logger logger = LoggerFactory.getLogger(KitDaoJPA2Impl.class);
@PersistenceContext(unitName="sitesOracle")
private EntityManager entityManager;
// Kit entete
public List<KitEntete> getKitEntete(String metier, String sitegeo, String cptdossier, Integer numligne) {
String qlString = "SELECT k "+
"FROM KitEntete k "+
"WHERE k.ficheMetier = ?1 and k.ficheSitegeo = ?2 and k.ficheDossier = ?3 and k.ficheLigne = ?4";
TypedQuery<KitEntete> query = entityManager.createQuery(qlString, KitEntete.class);
query.setParameter(1, metier);
query.setParameter(2, sitegeo);
query.setParameter(3, cptdossier);
query.setParameter(4, numligne);
return query.getResultList();
}
KitEntete
public class KitEntete extends BaseKitEntete {
private static final long serialVersionUID = 1L;
/*[CONSTRUCTOR MARKER BEGIN]*/
public KitEntete () {
super();
}
/**
* Constructor for primary key
*/
public KitEntete (java.lang.Integer id) {
super(id);
}
/**
* Constructor for required fields
*/
public KitEntete (
java.lang.Integer id,
java.lang.Integer statut) {
super (
id,
statut);
}
/*[CONSTRUCTOR MARKER END]*/
}
BaseKitEntete
import java.io.Serializable;
public abstract class BaseKitEntete implements Serializable {
public static String REF = "KitEntete";
public static String PROP_PRODUIT = "produit";
public static String PROP_FICHE_SITEGEO = "ficheSitegeo";
public static String PROP_DATEMOD = "datemod";
public static String PROP_BL_METIER = "blMetier";
public static String PROP_FICHE_DOSSIER = "ficheDossier";
public static String PROP_UTILCRE = "utilcre";
public static String PROP_BL_NUMBL = "blNumbl";
public static String PROP_BL_SITEGEO = "blSitegeo";
public static String PROP_BON_LIV_RETOUR = "bonLivRetour";
public static String PROP_DATECRE = "datecre";
public static String PROP_TYPE_KIT = "type_kit";
public static String PROP_TYPE_CARTE = "type_carte";
public static String PROP_FICHE_LIGNE = "ficheLigne";
public static String PROP_STATUT = "statut";
public static String PROP_UTILMOD = "utilmod";
public static String PROP_FICHE_METIER = "ficheMetier";
public static String PROP_ID = "id";
// constructors
public BaseKitEntete () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseKitEntete (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseKitEntete (
java.lang.Integer id,
java.lang.Integer statut) {
this.setId(id);
this.setStatut(statut);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.Integer statut;
private java.lang.String blMetier;
private java.lang.String blSitegeo;
private java.lang.String blNumbl;
private java.lang.String ficheMetier;
private java.lang.String ficheSitegeo;
private java.lang.String ficheDossier;
private java.lang.Integer ficheLigne;
private java.lang.String utilcre;
private java.util.Date datecre;
private java.lang.String utilmod;
private java.util.Date datemod;
private java.lang.Integer type_kit;
private java.lang.Integer type_carte;
private java.lang.String bonLivRetour;
// collections
private java.util.Set<com.myc.android.rest.entities.KitLigne> kitLigne;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="sequence"
* column="ID"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: STATUT
*/
public java.lang.Integer getStatut () {
return statut;
}
/**
* Set the value related to the column: STATUT
* @param statut the STATUT value
*/
public void setStatut (java.lang.Integer statut) {
this.statut = statut;
}
/**
* Return the value associated with the column: BL_METIER
*/
public java.lang.String getBlMetier () {
return blMetier;
}
/**
* Set the value related to the column: BL_METIER
* @param blMetier the BL_METIER value
*/
public void setBlMetier (java.lang.String blMetier) {
this.blMetier = blMetier;
}
/**
* Return the value associated with the column: BL_SITEGEO
*/
public java.lang.String getBlSitegeo () {
return blSitegeo;
}
/**
* Set the value related to the column: BL_SITEGEO
* @param blSitegeo the BL_SITEGEO value
*/
public void setBlSitegeo (java.lang.String blSitegeo) {
this.blSitegeo = blSitegeo;
}
/**
* Return the value associated with the column: BL_NUMBL
*/
public java.lang.String getBlNumbl () {
return blNumbl;
}
/**
* Set the value related to the column: BL_NUMBL
* @param blNumbl the BL_NUMBL value
*/
public void setBlNumbl (java.lang.String blNumbl) {
this.blNumbl = blNumbl;
}
/**
* Return the value associated with the column: FICHE_METIER
*/
public java.lang.String getFicheMetier () {
return ficheMetier;
}
/**
* Set the value related to the column: FICHE_METIER
* @param ficheMetier the FICHE_METIER value
*/
public void setFicheMetier (java.lang.String ficheMetier) {
this.ficheMetier = ficheMetier;
}
/**
* Return the value associated with the column: FICHE_SITEGEO
*/
public java.lang.String getFicheSitegeo () {
return ficheSitegeo;
}
/**
* Set the value related to the column: FICHE_SITEGEO
* @param ficheSitegeo the FICHE_SITEGEO value
*/
public void setFicheSitegeo (java.lang.String ficheSitegeo) {
this.ficheSitegeo = ficheSitegeo;
}
/**
* Return the value associated with the column: FICHE_CPTDOSSIER
*/
public java.lang.String getFicheDossier () {
return ficheDossier;
}
/**
* Set the value related to the column: FICHE_CPTDOSSIER
* @param ficheDossier the FICHE_CPTDOSSIER value
*/
public void setFicheDossier (java.lang.String ficheDossier) {
this.ficheDossier = ficheDossier;
}
/**
* Return the value associated with the column: FICHE_NUMLIGNE
*/
public java.lang.Integer getFicheLigne () {
return ficheLigne;
}
/**
* Set the value related to the column: FICHE_NUMLIGNE
* @param ficheLigne the FICHE_NUMLIGNE value
*/
public void setFicheLigne (java.lang.Integer ficheLigne) {
this.ficheLigne = ficheLigne;
}
/**
* Return the value associated with the column: UTILCRE
*/
public java.lang.String getUtilcre () {
return utilcre;
}
/**
* Set the value related to the column: UTILCRE
* @param utilcre the UTILCRE value
*/
public void setUtilcre (java.lang.String utilcre) {
this.utilcre = utilcre;
}
/**
* Return the value associated with the column: DATECRE
*/
public java.util.Date getDatecre () {
return datecre;
}
/**
* Set the value related to the column: DATECRE
* @param datecre the DATECRE value
*/
public void setDatecre (java.util.Date datecre) {
this.datecre = datecre;
}
/**
* Return the value associated with the column: UTILMOD
*/
public java.lang.String getUtilmod () {
return utilmod;
}
/**
* Set the value related to the column: UTILMOD
* @param utilmod the UTILMOD value
*/
public void setUtilmod (java.lang.String utilmod) {
this.utilmod = utilmod;
}
/**
* Return the value associated with the column: DATEMOD
*/
public java.util.Date getDatemod () {
return datemod;
}
/**
* Set the value related to the column: DATEMOD
* @param datemod the DATEMOD value
*/
public void setDatemod (java.util.Date datemod) {
this.datemod = datemod;
}
/**
* Return the value associated with the column: TYPE_KIT
*/
public java.lang.Integer getType_kit () {
return type_kit;
}
/**
* Set the value related to the column: TYPE_KIT
* @param type_kit the TYPE_KIT value
*/
public void setType_kit (java.lang.Integer type_kit) {
this.type_kit = type_kit;
}
/**
* Return the value associated with the column: TYPE_CARTE
*/
public java.lang.Integer getType_carte () {
return type_carte;
}
/**
* Set the value related to the column: TYPE_CARTE
* @param type_carte the TYPE_CARTE value
*/
public void setType_carte (java.lang.Integer type_carte) {
this.type_carte = type_carte;
}
/**
* Return the value associated with the column: BON_LIV_RETOUR
*/
public java.lang.String getBonLivRetour () {
return bonLivRetour;
}
/**
* Set the value related to the column: BON_LIV_RETOUR
* @param bonLivRetour the BON_LIV_RETOUR value
*/
public void setBonLivRetour (java.lang.String bonLivRetour) {
this.bonLivRetour = bonLivRetour;
}
/**
* Return the value associated with the column: NUMPRO
public com.myc.android.rest.entities.References getProduit () {
return produit;
}
public void setProduit (com.myc.android.rest.entities.References produit) {
this.produit = produit;
}
*/
/**
* Return the value associated with the column: kitLigne
*/
public java.util.Set<com.myc.android.rest.entities.KitLigne> getKitLigne () {
return kitLigne;
}
/**
* Set the value related to the column: kitLigne
* @param kitLigne the kitLigne value
*/
public void setKitLigne (java.util.Set<com.myc.android.rest.entities.KitLigne> kitLigne) {
this.kitLigne = kitLigne;
}
public void addTokitLigne (com.myc.android.rest.entities.KitLigne kitLigne) {
if (null == getKitLigne()) setKitLigne(new java.util.TreeSet<com.myc.android.rest.entities.KitLigne>());
getKitLigne().add(kitLigne);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.myc.android.rest.entities.KitEntete)) return false;
else {
com.myc.android.rest.entities.KitEntete kitEntete = (com.myc.android.rest.entities.KitEntete) obj;
if (null == this.getId() || null == kitEntete.getId()) return false;
else return (this.getId().equals(kitEntete.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}