本文整理汇总了Python中dctmpy.obj.typedobject.TypedObject类的典型用法代码示例。如果您正苦于以下问题:Python TypedObject类的具体用法?Python TypedObject怎么用?Python TypedObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TypedObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: put_file
def put_file(session, storage_id, file, format):
obj = TypedObject(session=session)
obj.set_id("STORAGE", storage_id)
obj.set_string("FILE", file)
obj.set_id("FORMAT", format)
obj.set_bool("MAC_CLIENT", False)
return obj
示例2: execute
def execute(session, query, for_update, batch_hint, bof_dql=False):
obj = TypedObject(session=session)
obj.set_string("QUERY", query)
obj.set_bool("FOR_UPDATE", for_update)
obj.set_int("BATCH_HINT", batch_hint)
obj.set_bool("BOF_DQL", bof_dql)
return obj
示例3: query
def query(session, query, forUpdate, batchHint, bofDql):
obj = TypedObject(session=session)
obj.add(AttrValue(name="QUERY", type=STRING, values=[query]))
obj.add(AttrValue(name="FOR_UPDATE", type=BOOL, values=[forUpdate]))
obj.add(AttrValue(name="BATCH_HINT", type=INT, values=[batchHint]))
obj.add(AttrValue(name="BOF_DQL", type=BOOL, values=[bofDql]))
return obj
示例4: get_attribute_nls_info
def get_attribute_nls_info(session, type, attribute, policy=NULL_ID, state=0):
obj = TypedObject(session=session)
obj.set_string("TYPE_NAME", type)
obj.set_string("ATTR_NAME", attribute)
obj.set_id("POLICY_ID", policy)
obj.set_int("POLICY_STATE", state)
return obj
示例5: _docbase_map_request
def _docbase_map_request(handle, version):
obj = TypedObject(ser_version=0)
obj.set_string("DBR_REQUEST_NAME", "DBRN_GET_DOCBASE_MAP")
obj.set_int("DBR_REQUEST_VERSION", 1)
obj.set_string("DBR_REQUEST_HANDLE", handle)
obj.set_string("DBR_SOFTWARE_VERSION", version)
return obj
示例6: server_dir
def server_dir(session, path, dirs=True, files=True, links=True):
obj = TypedObject(session=session)
obj.set_string("DIRECTORY", path)
obj.set_bool("LIST_DIR", dirs)
obj.set_bool("LIST_FILE", files)
obj.set_bool("LIST_LINK", links)
return obj
示例7: checkout_license
def checkout_license(session, feature_name, feature_version, user=None):
obj = TypedObject(session=session)
if not user:
user = session.username
obj.set_string("FEATURE_NAME", feature_name)
obj.set_string("FEATURE_VERSION", feature_version)
obj.set_string("USER_LOGIN_NAME", user)
return obj
示例8: log_on
def log_on(session, detail):
obj = TypedObject(session=session)
obj.set_bool("DETAIL", detail)
return obj
示例9: audit_on
def audit_on(session, event):
obj = TypedObject(session=session)
obj.set_string("EVENT", event)
return obj
示例10: log_message
def log_message(session, message):
obj = TypedObject(session=session)
obj.set_id("MESSAGE", message)
return obj
示例11: stamp_trace
def stamp_trace(session, message):
obj = TypedObject(session=session)
obj.set_id("MESSAGE", message)
return obj
示例12: fetch_type
def fetch_type(session, typename, vstamp):
obj = TypedObject(session=session)
obj.set_string("TYPE_NAME", typename)
obj.set_int("CACHE_VSTAMP", vstamp)
return obj
示例13: acl_obj_get_x_permit
def acl_obj_get_x_permit(session, accessor):
obj = TypedObject(session=session)
if not is_empty(accessor):
obj.set_string("_ACC_NAME_", accessor)
return obj
示例14: allow_base_as_features
def allow_base_as_features(session, allow=True):
obj = TypedObject(session=session)
obj.set_bool("VALUE", allow)
return obj
示例15: encrypt_password
def encrypt_password(session, password):
obj = TypedObject(session=session)
obj.set_string("PASSWORD_TO_ENCRYPT", session.obfuscate(password))
return obj