public class Entity extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Entity.Type
The type of the entity.
|
Constructor and Description |
---|
Entity()
Only used by serialization.
|
Entity(Database database,
boolean complete)
Constructor for a database.
|
Entity(Database database,
String strObj,
String className,
Entity.Type type)
Create an entity representing a object with given name, database namespace and type
|
Entity(DummyPartition p,
boolean complete) |
Entity(Partition p,
boolean complete)
Constructor for a partition.
|
Entity(org.apache.hadoop.fs.Path d,
boolean islocal,
boolean complete) |
Entity(String name,
Entity.Type t)
Constructor for a entity with string object representation (eg SERVICE_NAME)
|
Entity(Table t,
boolean complete)
Constructor for a table.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Equals function.
|
String |
getClassName() |
org.apache.hadoop.fs.Path |
getD() |
Database |
getDatabase() |
String |
getFunctionName() |
URI |
getLocation()
Get the location of the entity.
|
String |
getName() |
Partition |
getP() |
Map<String,String> |
getParameters()
Get the parameter map of the Entity.
|
Partition |
getPartition()
Get the partition associated with the entity.
|
String |
getServiceName() |
Table |
getT() |
Table |
getTable()
Get the table associated with the entity.
|
Entity.Type |
getTyp() |
Entity.Type |
getType()
Get the type of the entity.
|
int |
hashCode()
Hashcode function.
|
boolean |
isComplete() |
boolean |
isDummy() |
boolean |
isPathType() |
void |
setClassName(String className) |
void |
setComplete(boolean complete) |
void |
setD(org.apache.hadoop.fs.Path d) |
void |
setDatabase(Database database) |
void |
setFunctionName(String funcName) |
void |
setP(Partition p) |
void |
setT(Table t) |
void |
setTyp(Entity.Type typ) |
String |
toString()
toString function.
|
public Entity()
public Entity(Database database, boolean complete)
database
- Database that is read or written to.complete
- Means the database is target, not for table or partition, etc.public Entity(String name, Entity.Type t)
name
- Used for service that action is being authorized on.
Currently hostname is used for service name.t
- Type of entitypublic Entity(Table t, boolean complete)
t
- Table that is read or written to.public Entity(Partition p, boolean complete)
p
- Partition that is read or written to.public Entity(DummyPartition p, boolean complete)
public Entity(org.apache.hadoop.fs.Path d, boolean islocal, boolean complete)
public Entity(Database database, String strObj, String className, Entity.Type type)
database
- - database namespacestrObj
- - object name as stringclassName
- - function class nametype
- - the entity type. this constructor only supports FUNCTION type currentlypublic boolean isComplete()
public void setComplete(boolean complete)
public String getName()
public Database getDatabase()
public void setDatabase(Database database)
public Entity.Type getTyp()
public void setTyp(Entity.Type typ)
public Table getT()
public void setT(Table t)
public Partition getP()
public void setP(Partition p)
public org.apache.hadoop.fs.Path getD()
public void setD(org.apache.hadoop.fs.Path d)
public String getClassName()
public void setClassName(String className)
public String getFunctionName()
public void setFunctionName(String funcName)
public String getServiceName()
public Entity.Type getType()
public boolean isPathType()
public URI getLocation() throws Exception
Exception
public Partition getPartition()
public Table getTable()
public boolean isDummy()
Copyright © 2022 The Apache Software Foundation. All rights reserved.