org.efaps.db.print.value.AttributeValueSelect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of efaps-kernel Show documentation
Show all versions of efaps-kernel Show documentation
eFaps is a framework used to map objects with or without attached files to
a relational database and optional file systems (only for attaches files). Configurable access control can be provided down to object and attribute level depending on implementation and use case. Depending on requirements, events (like triggers) allow to implement business logic and to separate business logic from user interface.
The framework includes integrations (e.g. webdav, full text search) and a web application as 'simple' configurable user interface. Some best practises, example web application modules (e.g. team work module) support administrators and implementers using this framework.
/*
* Copyright 2003 - 2011 The eFaps Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Revision: $Rev: 6706 $
* Last Changed: $Date: 2011-07-05 14:19:31 -0500 (Tue, 05 Jul 2011) $
* Last Changed By: $Author: [email protected] $
*/
package org.efaps.db.print.value;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.efaps.admin.datamodel.Attribute;
import org.efaps.admin.datamodel.Type;
import org.efaps.db.print.OneSelect;
import org.efaps.db.wrapper.SQLSelect;
import org.efaps.util.EFapsException;
/**
* TODO comment!
*
* @author The eFaps Team
* @version $Id: AttributeValueSelect.java 3520 2009-12-21 12:37:44Z tim.moxter
* $
*/
public class AttributeValueSelect
extends AbstractValueSelect
{
/**
* Attribute belonging to this AttributeValueSelect.
*/
private Attribute attribute;
/**
* Name of the Attribute belonging to this AttributeValueSelect.
*/
private String attrName;
/**
* @param _oneSelect OneSelect
* @param _attrName name of the attribute
*/
public AttributeValueSelect(final OneSelect _oneSelect,
final String _attrName)
{
super(_oneSelect);
this.attrName = _attrName;
}
/**
* @param _oneSelect OneSelect
* @param _attr Attribute
*/
public AttributeValueSelect(final OneSelect _oneSelect,
final Attribute _attr)
{
super(_oneSelect);
this.attribute = _attr;
}
/**
* Getter method for instance variable {@link #attrName}.
*
* @return value of instance variable {@link #attrName}
*/
public String getAttrName()
{
return this.attrName;
}
/**
* {@inheritDoc}
*/
@Override
public Attribute getAttribute()
{
return this.attribute;
}
/**
* Setter method for instance variable {@link #attribute}.
*
* @param _attribute value for instance variable {@link #attribute}
*/
public void setAttribute(final Attribute _attribute)
{
this.attribute = _attribute;
}
/**
* {@inheritDoc}
*/
@Override
public Object getValue(final Object _object)
throws EFapsException
{
final ArrayList