public class Function extends LazyLoad
Constructor and Description |
---|
Function() |
Modifier and Type | Method and Description |
---|---|
void |
addSimpleTag(String category,
String key,
String value)
Attach a simple tag to this function.
|
void |
addTag(Tag tag)
Attach a
Tag to this function. |
String |
getClassPath()
获得函数使用的类名
|
String |
getClassType()
Deprecated.
|
Date |
getCreatedTime()
获取函数创建时间
|
String |
getEmbeddedFunctionCode()
Returns code if this is an embedded function, otherwise null
|
String |
getEmbeddedFunctionFilename()
Return filename if this is an embedded function, otherwise null
|
String |
getEmbeddedFunctionProgramLanguage()
Returns program language if this is an embedded function, otherwise null
|
String |
getName()
获得函数名
|
String |
getOwner()
获得函数所属用户
|
String |
getProject()
获取函数所在
Project 名称 |
List<String> |
getResourceFullNames()
Get the full names of resources that this function depends on.
|
List<String> |
getResourceNames()
Deprecated.
|
List<Resource> |
getResources()
获得函数相关的资源列表。UDF所用到的资源列表,这个里面必须包括UDF代码所在的资源。如果用户UDF中需要读取其他资源文件,这个列表中还得包括UDF所读取的资源文件列表。
|
String |
getSchemaName() |
Map<String,Map<String,String>> |
getSimpleTags()
Get simple tags attached to this function.
|
String |
getSqlDefinitionText()
Get the SQL definition text of this function.
|
List<Tag> |
getTags()
Get
Tag (s) attached to this function. |
boolean |
isEmbeddedFunction()
Returns true if this is an embedded function, otherwise false
|
boolean |
isSqlFunction()
Check if this function is a SQL function.
|
void |
reload()
重新加载属性值
|
void |
removeSimpleTag(String category,
String key,
String value)
Remove a simple tag.
|
void |
removeTag(Tag tag)
Remove a
Tag . |
void |
setClassPath(String classPath)
设置函数使用的类名
|
void |
setClassType(String classType)
Deprecated.
|
void |
setName(String name)
设置函数名
|
void |
setResources(List<String> resources)
设置函数依赖的相关资源
|
void |
updateOwner(String newOwner) |
public String getName()
public void setName(String name)
name
- 函数名public String getOwner()
public Date getCreatedTime()
@Deprecated public String getClassType()
public String getClassPath()
@Deprecated public void setClassType(String classType)
public void setClassPath(String classPath)
classPath
- 函数使用的类名public List<Resource> getResources()
@Deprecated public List<String> getResourceNames()
getResourceFullNames()
public List<String> getResourceFullNames()
ReloadException
will be thrown if lazy loading failed.public void setResources(List<String> resources)
resources
- 资源列表public String getSchemaName()
public boolean isSqlFunction()
public String getSqlDefinitionText()
public boolean isEmbeddedFunction()
public String getEmbeddedFunctionProgramLanguage()
public String getEmbeddedFunctionCode()
public String getEmbeddedFunctionFilename()
public void reload() throws OdpsException
LazyLoad
reload
in class LazyLoad
OdpsException
public void updateOwner(String newOwner) throws OdpsException
OdpsException
public Map<String,Map<String,String>> getSimpleTags()
public void addTag(Tag tag) throws OdpsException
Tag
to this function. The function and tag should be in a same project.tag
- tag to attachOdpsException
public void addSimpleTag(String category, String key, String value) throws OdpsException
category
- simple tag category, could be nul.key
- simple tag key, cannot be null.value
- simple tag value, cannot be null.OdpsException
public void removeTag(Tag tag) throws OdpsException
Tag
.tag
- tag to remove.OdpsException
public void removeSimpleTag(String category, String key, String value) throws OdpsException
category
- category.key
- key.value
- value.OdpsException
Copyright © 2025 Alibaba Cloud Computing. All rights reserved.