models.entity
Class Right

java.lang.Object
  extended by play.db.ebean.Model
      extended by models.entity.Right
All Implemented Interfaces:
be.objectify.deadbolt.core.models.Role, com.avaje.ebean.bean.EntityBean, java.io.Serializable

@Entity
public class Right
extends play.db.ebean.Model
implements be.objectify.deadbolt.core.models.Role

right model

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class play.db.ebean.Model
play.db.ebean.Model.Finder<I,T>
 
Field Summary
static play.db.ebean.Model.Finder<java.lang.Long,Right> find
           
 
Fields inherited from class play.db.ebean.Model
_ebean_identity, _ebean_intercept
 
Constructor Summary
Right(java.lang.Long id, java.lang.String name, java.lang.Boolean admin, MapExtent mapExtent)
           
 
Method Summary
 java.lang.Boolean accessesToLayer(Layer layer)
           
static java.lang.Boolean checkAccessesToLayer(Layer layer)
          check access to layer for current user
static java.lang.Boolean checkAccessesToLayer(User user, Layer layer)
          heck access to layer for input user
static Right demoRight()
          get default right for users witch are not authorization
 java.lang.Boolean getAdmin()
          if right is admin return true otherwise false
 java.lang.Long getId()
           
 java.util.List<RightLayerAccess> getLayerAccessesList()
           
 MapExtent getMapExtent()
          get mapExtent of right
 java.lang.String getName()
           
 void setAdmin(java.lang.Boolean admin)
          set is this right an admin
 void setId(java.lang.Long id)
           
 void setLayerAccessesList(java.util.List<RightLayerAccess> layerAccessesList)
          set list access to layers
 void setMapExtent(MapExtent mapExtent)
           
 void setName(java.lang.String name)
          set name
static Right unique(java.lang.Long id)
          find right by id
 
Methods inherited from class play.db.ebean.Model
_ebean_createCopy, _ebean_get__idGetSet, _ebean_getField, _ebean_getFieldIntercept, _ebean_getFieldNames, _ebean_getIntercept, _ebean_getMarker, _ebean_getni__idGetSet, _ebean_intercept, _ebean_isEmbeddedNewOrDirty, _ebean_newInstance, _ebean_set__idGetSet, _ebean_setEmbeddedLoaded, _ebean_setField, _ebean_setFieldIntercept, _ebean_setni__idGetSet, addPropertyChangeListener, addPropertyChangeListener, delete, delete, deleteManyToManyAssociations, equals, hashCode, refresh, refresh, removePropertyChangeListener, removePropertyChangeListener, save, save, saveManyToManyAssociations, saveManyToManyAssociations, update, update, update, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

find

public static play.db.ebean.Model.Finder<java.lang.Long,Right> find
See Also:
Finder
Constructor Detail

Right

public Right(java.lang.Long id,
             java.lang.String name,
             java.lang.Boolean admin,
             MapExtent mapExtent)
Method Detail

getId

public java.lang.Long getId()
Returns:
right id

setId

public void setId(java.lang.Long id)
Parameters:
id - right id

getName

public java.lang.String getName()
Specified by:
getName in interface be.objectify.deadbolt.core.models.Role
Returns:
name of right

setName

public void setName(java.lang.String name)
set name

Parameters:
name -

getAdmin

public java.lang.Boolean getAdmin()
if right is admin return true otherwise false

Returns:

setAdmin

public void setAdmin(java.lang.Boolean admin)
set is this right an admin

Parameters:
admin - boolean value

getMapExtent

public MapExtent getMapExtent()
get mapExtent of right

Returns:
MapExtent object
See Also:
MapExtent

setMapExtent

public void setMapExtent(MapExtent mapExtent)
Parameters:
mapExtent - mapExtent of right
See Also:
MapExtent

getLayerAccessesList

public java.util.List<RightLayerAccess> getLayerAccessesList()
Returns:
return list of access to layers
See Also:
RightLayerAccess

setLayerAccessesList

public void setLayerAccessesList(java.util.List<RightLayerAccess> layerAccessesList)
set list access to layers

Parameters:
layerAccessesList -
See Also:
RightLayerAccess

accessesToLayer

public java.lang.Boolean accessesToLayer(Layer layer)
Parameters:
layer - Layer object
Returns:
true if right has access to layer otherwise false

unique

public static Right unique(java.lang.Long id)
find right by id

Parameters:
id - id of right
Returns:
Right object or null if right with this id is not found

checkAccessesToLayer

public static java.lang.Boolean checkAccessesToLayer(Layer layer)
check access to layer for current user

Parameters:
layer - Layer object
Returns:
boolean value
See Also:
User

checkAccessesToLayer

public static java.lang.Boolean checkAccessesToLayer(User user,
                                                     Layer layer)
heck access to layer for input user

Parameters:
user - User object
layer - Layer object
Returns:
boolean value
See Also:
Layer, User

demoRight

public static Right demoRight()
get default right for users witch are not authorization

Returns:
Right object