📄 classmapping.java
字号:
// $CALOLSI$
/*
* #=========================================================================
* # Copyright 2004 SRI International. All rights reserved.
* #
* # The material contained in this file is confidential and proprietary to SRI
* # International and may not be reproduced, published, or disclosed to others
* # without authorization from SRI International.
* #
* # DISCLAIMER OF WARRANTIES
* #
* # SRI International MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
* # SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT
* # LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* # PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SRI International SHALL NOT BE
* # LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* # OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES
* #=========================================================================
* Author : evans
* Date: May 6, 2004
* Time: 2:28:18 PM
*/
package com.sri.oaa2.mapper;
import java.util.Arrays;
/**
*
*/
public class ClassMapping
extends AbstractMapping
{
private Class mappingClass;
private PropertyMapping[] properties;
private IclMapper mapper;
public Class getMappingClass()
{
return mappingClass;
}
public void setMappingClass(Class mappingClass)
{
this.mappingClass = mappingClass;
}
public PropertyMapping[] getProperties()
{
return properties;
}
public void setProperties(PropertyMapping[] properties)
{
this.properties = properties;
}
public void setMapper(IclMapper mapper)
{
this.mapper = mapper;
}
public IclMapper getMapper()
{
return mapper;
}
public String toString()
{
return "ClassMapping{" +
"mappingClass=" + mappingClass +
", properties=" + (properties == null ? null : Arrays.asList(properties)) +
", mapper=" + mapper +
"}";
}
public Class getPropertyType(String property)
{
for(int i = 0; i < properties.length; i++)
{
PropertyMapping propertyMapping = properties[i];
if(propertyMapping.getProperty().getName().equals(property)) return propertyMapping.getType();
}
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -