List of usage examples for org.hibernate MappingException MappingException
public MappingException(String message)
From source file:org.zanata.model.type.RequestTypeType.java
License:Open Source License
public RequestType stringToObject(String xml) throws Exception { if (xml.length() < 1) { throw new MappingException("multiple or zero characters found parsing string '" + xml + "'"); }/*from w w w .j a va 2 s.c o m*/ return RequestType.getValueOf(xml); }
From source file:org.zanata.model.type.RoleTypeType.java
License:Open Source License
@Override public RoleType stringToObject(String xml) throws Exception { if (xml.length() != 1) { throw new MappingException("multiple or zero characters found parsing string"); }// www. j a v a 2s . co m return HAccountRole.RoleType.valueOf(xml.charAt(0)); }
From source file:org.zanata.model.type.TranslationSourceTypeType.java
License:Open Source License
public TranslationSourceType stringToObject(String xml) throws Exception { if (xml.length() < 1) { throw new MappingException("multiple or zero characters found parsing string"); }//from w w w . j a va 2s.c om return TranslationSourceType.getValueOf(xml); }
From source file:org.zanata.model.type.WebhookTypeType.java
License:Open Source License
public WebhookType stringToObject(String xml) throws Exception { if (xml.length() < 1) { throw new MappingException("multiple or zero characters found parsing string"); }/*from w w w .j ava 2 s . c o m*/ return WebhookType.valueOf(xml); }