net.anotheria.anoprise.dataspace.attribute.LongAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ano-prise Show documentation
Show all versions of ano-prise Show documentation
Collection of utils for different enterprise class projects. Among other stuff contains
Caches, Mocking, DualCrud, MetaFactory and SessionDistributorService. Visit https://opensource.anotheria.net for details.
package net.anotheria.anoprise.dataspace.attribute;
/**
* Long attribute used in dataspace.
*
* @author abolbat
*/
public class LongAttribute extends Attribute {
/**
* Basic serialVersionUID variable.
*/
private static final long serialVersionUID = 4308729762623979292L;
/**
* Attribute long value.
*/
private long value;
/**
* Default constructor.
*
* @param aName
* - attribute name
* @param aStringValue
* - attribute value as string
*/
public LongAttribute(String aName, String aStringValue) {
super(aName);
this.value = Long.parseLong(aStringValue);
}
/**
* Default constructor.
*
* @param aName
* - attribute name
* @param aValue
* - attribute value
*/
public LongAttribute(String aName, long aValue) {
super(aName);
this.value = aValue;
}
@Override
public String getValueAsString() {
return String.valueOf(value);
}
@Override
public AttributeType getType() {
return AttributeType.LONG;
}
public void setValue(long aValue) {
this.value = aValue;
}
public long getValue() {
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy