Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Tentackle - https://tentackle.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.tentackle.ns.pdo;
import org.tentackle.bind.Bindable;
import org.tentackle.misc.TrackedList;
import org.tentackle.pdo.DomainKey;
import org.tentackle.pdo.PersistentObject;
import org.tentackle.session.Persistent;
import org.tentackle.validate.validator.NotNull;
/**
* Persistence interface for number pool.
*
* @author harald
*/
public interface NumberPoolPersistence extends PersistentObject {
// @wurblet fieldlengths ColumnLengths
////GEN-BEGIN:fieldlengths
/** maximum number of characters for 'name'. */
int CL_NAME = 30;
/** maximum number of characters for 'realm'. */
int CL_REALM = 80;
////GEN-END:fieldlengths
// @wurblet membernames AttributeNames
////GEN-BEGIN:membernames
/** relation name for 'composite list of NumberRange numberRangeList via NumberRange#numberPoolId'. */
String RN_NUMBERRANGELIST = "numberRangeList";
/** attribute name for database column 'name'. */
String AN_NAME = "name";
/** attribute name for database column 'realm'. */
String AN_REALM = "realm";
/** attribute name for database column 'description'. */
String AN_DESCRIPTION = "description";
/** attribute name for database column 'poolonline'. */
String AN_ONLINE = "online";
/** attribute name for database column 'lowmark'. */
String AN_LOWWATERMARK = "lowWaterMark";
/** attribute name for database column 'reqsize'. */
String AN_REQUESTSIZE = "requestSize";
/** attribute name for database column 'uplink'. */
String AN_UPLINK = "uplink";
////GEN-END:membernames
// @wurblet methods Methods
////GEN-BEGIN:methods
/**
* Gets the attribute name.
*
* @return the number pool name
*/
@Persistent(ordinal=0, comment="the number pool name")
@NotNull
@DomainKey
String getName();
/**
* Sets the attribute name.
*
* @param name the number pool name
*/
void setName(String name);
/**
* Gets the modification state of name.
*
* @return true if modified
*/
boolean isNameModified();
/**
* Gets the last persisted value of name.
*
* @return the last persisted value
*/
String getNamePersisted();
/**
* Gets the attribute realm.
*
* @return pool realm, optional
*/
@Persistent(ordinal=1, comment="pool realm, optional")
String getRealm();
/**
* Sets the attribute realm.
*
* @param realm pool realm, optional
*/
void setRealm(String realm);
/**
* Gets the modification state of realm.
*
* @return true if modified
*/
boolean isRealmModified();
/**
* Gets the last persisted value of realm.
*
* @return the last persisted value
*/
String getRealmPersisted();
/**
* Gets the attribute description.
*
* @return short description
*/
@Persistent(ordinal=2, comment="short description")
String getDescription();
/**
* Sets the attribute description.
*
* @param description short description
*/
void setDescription(String description);
/**
* Gets the modification state of description.
*
* @return true if modified
*/
boolean isDescriptionModified();
/**
* Gets the last persisted value of description.
*
* @return the last persisted value
*/
String getDescriptionPersisted();
/**
* Gets the attribute online.
*
* @return true if online, else offline
*/
@Persistent(ordinal=3, comment="true if online, else offline")
boolean isOnline();
/**
* Sets the attribute online.
*
* @param online true if online, else offline
*/
void setOnline(boolean online);
/**
* Gets the modification state of online.
*
* @return true if modified
*/
boolean isOnlineModified();
/**
* Gets the last persisted value of online.
*
* @return the last persisted value
*/
boolean isOnlinePersisted();
/**
* Gets the attribute lowWaterMark.
*
* @return minimum number count before request to fill up from uplink, 0 to disable
*/
@Persistent(ordinal=4, comment="minimum number count before request to fill up from uplink, 0 to disable")
long getLowWaterMark();
/**
* Sets the attribute lowWaterMark.
*
* @param lowWaterMark minimum number count before request to fill up from uplink, 0 to disable
*/
void setLowWaterMark(long lowWaterMark);
/**
* Gets the modification state of lowWaterMark.
*
* @return true if modified
*/
boolean isLowWaterMarkModified();
/**
* Gets the last persisted value of lowWaterMark.
*
* @return the last persisted value
*/
long getLowWaterMarkPersisted();
/**
* Gets the attribute requestSize.
*
* @return number count to request from uplink, 0 to disable
*/
@Persistent(ordinal=5, comment="number count to request from uplink, 0 to disable")
long getRequestSize();
/**
* Sets the attribute requestSize.
*
* @param requestSize number count to request from uplink, 0 to disable
*/
void setRequestSize(long requestSize);
/**
* Gets the modification state of requestSize.
*
* @return true if modified
*/
boolean isRequestSizeModified();
/**
* Gets the last persisted value of requestSize.
*
* @return the last persisted value
*/
long getRequestSizePersisted();
/**
* Gets the attribute uplink.
*
* @return uplink configuration (optional)
*/
@Persistent(ordinal=6, comment="uplink configuration (optional)")
@NotNull(condition="$slave")
String getUplink();
/**
* Sets the attribute uplink.
*
* @param uplink uplink configuration (optional)
*/
void setUplink(String uplink);
/**
* Gets the modification state of uplink.
*
* @return true if modified
*/
boolean isUplinkModified();
/**
* Gets the last persisted value of uplink.
*
* @return the last persisted value
*/
String getUplinkPersisted();
/**
* Selects NumberPool by its unique domain key.
*
* @param name the number pool name
* @return the NumberPool, null if no such PDO
*/
NumberPool selectByUniqueDomainKey(String name);
////GEN-END:methods
// @wurblet relations Relations
////GEN-BEGIN:relations
/**
* Gets composite list of NumberRange numberRangeList via NumberRange#numberPoolId.
*
* @return numberRangeList NumberRange
*/
@Bindable
@Persistent(ordinal=0, comment="NumberRange")
TrackedList getNumberRangeList();
/**
* Returns whether NumberRange is loaded.
*
* @return true if getNumberRangeList() invoked at least once
*/
@Bindable
boolean isNumberRangeListLoaded();
////GEN-END:relations
/**
* Selects by pool name and realm.
*
* @param name the pool's name
* @param realm the optional realm
* @return the pool
*/
NumberPool selectByNameRealm(String name, String realm);
/**
* Force the ranges to be reloaded.
*/
void reloadRanges();
}