Refs #1346 Better error reporting and JavaDocs

This commit is contained in:
Konstantin Krivopustov 2012-11-23 15:54:52 +00:00
parent 62faad76b0
commit e68cb03a0c
5 changed files with 24 additions and 6 deletions

View File

@ -1,3 +1,9 @@
/*
* Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
*/
package com.haulmont.chile.core.datatypes;
import java.sql.ResultSet;
@ -7,7 +13,10 @@ import java.text.ParseException;
import java.util.Locale;
/**
* Represents a data type of entity property
* Represents a data type of entity property.
*
* @author abramov
* @version $Id$
*/
public interface Datatype<T> {

View File

@ -1,3 +1,9 @@
/*
* Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
*/
package com.haulmont.chile.core.datatypes;
import org.apache.commons.logging.Log;
@ -20,6 +26,9 @@ import javax.ejb.Local;
* <p>
* Automatically loads datatype definitions from the file <code>datatypes.xml</code> in the root of classpath. If no
* such file found, configures datatypes from <code>/com/haulmont/chile/core/datatypes/datatypes.xml</code>
*
* @author abramov
* @version $Id$
*/
public class Datatypes {

View File

@ -55,6 +55,7 @@ public interface MetaClass extends MetadataObject<MetaClass> {
* @param propertyPath dot-separated string
* @return MetaPropertyPath instance, or null if the input parameter doesn't represent a valid path.
*/
@Nullable
MetaPropertyPath getPropertyPath(String propertyPath);
/**

View File

@ -259,9 +259,9 @@ public class ViewRepository {
}
final List<Element> propertyElements = propElem.elements("property");
boolean extenedView = !propertyElements.isEmpty();
boolean inlineView = !propertyElements.isEmpty();
if (refViewName != null && !extenedView) {
if (refViewName != null && !inlineView) {
if (!range.isClass())
throw new IllegalStateException(
@ -289,7 +289,7 @@ public class ViewRepository {
);
}
}
if (range.isClass() && refView == null && extenedView) {
if (range.isClass() && refView == null && inlineView) {
// try to import anonymous views
String ancestorViewName = propElem.attributeValue("view");
if (ancestorViewName == null) {
@ -308,7 +308,7 @@ public class ViewRepository {
private MetaClass getMetaClass(Element propElem, Range range) {
MetaClass refMetaClass;
String refEntityName = propElem.attributeValue("entity");
String refEntityName = propElem.attributeValue("entity"); // this attribute is deprecated
if (refEntityName == null) {
refMetaClass = range.asClass();
} else {

View File

@ -34,7 +34,6 @@
</xs:sequence>
<xs:attribute name="name"/>
<xs:attribute name="view"/>
<xs:attribute name="entity"/>
<xs:attribute name="lazy" type="xs:boolean"/>
</xs:complexType>