public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRoleName(); case PRINCIPAL_NAME: return getPrincipalName(); case PRINCIPAL_TYPE: return getPrincipalType(); case GRANT_OPTION: return isGrantOption(); case GRANT_TIME: return getGrantTime(); case GRANTOR_NAME: return getGrantorName(); case GRANTOR_PRINCIPAL_TYPE: return getGrantorPrincipalType(); } throw new IllegalStateException(); }
public HiveRoleGrant(RolePrincipalGrant thriftRoleGrant) { this.roleName = thriftRoleGrant.getRoleName(); this.principalName = thriftRoleGrant.getPrincipalName(); this.principalType = thriftRoleGrant.getPrincipalType().name(); this.grantOption = thriftRoleGrant.isGrantOption(); this.grantTime = thriftRoleGrant.getGrantTime(); this.grantor = thriftRoleGrant.getGrantorName(); this.grantorType = thriftRoleGrant.getGrantorPrincipalType() == null ? null : thriftRoleGrant.getGrantorPrincipalType().name(); }
public HiveRoleGrant(RolePrincipalGrant thriftRoleGrant) { this.roleName = thriftRoleGrant.getRoleName(); this.principalName = thriftRoleGrant.getPrincipalName(); this.principalType = thriftRoleGrant.getPrincipalType().name(); this.grantOption = thriftRoleGrant.isGrantOption(); this.grantTime = thriftRoleGrant.getGrantTime(); this.grantor = thriftRoleGrant.getGrantorName(); this.grantorType = thriftRoleGrant.getGrantorPrincipalType() == null ? null : thriftRoleGrant.getGrantorPrincipalType().name(); }
public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRoleName(); case PRINCIPAL_NAME: return getPrincipalName(); case PRINCIPAL_TYPE: return getPrincipalType(); case GRANT_OPTION: return Boolean.valueOf(isGrantOption()); case GRANT_TIME: return Integer.valueOf(getGrantTime()); case GRANTOR_NAME: return getGrantorName(); case GRANTOR_PRINCIPAL_TYPE: return getGrantorPrincipalType(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRoleName(); case PRINCIPAL_NAME: return getPrincipalName(); case PRINCIPAL_TYPE: return getPrincipalType(); case GRANT_OPTION: return Boolean.valueOf(isGrantOption()); case GRANT_TIME: return Integer.valueOf(getGrantTime()); case GRANTOR_NAME: return getGrantorName(); case GRANTOR_PRINCIPAL_TYPE: return getGrantorPrincipalType(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRoleName(); case PRINCIPAL_NAME: return getPrincipalName(); case PRINCIPAL_TYPE: return getPrincipalType(); case GRANT_OPTION: return isGrantOption(); case GRANT_TIME: return getGrantTime(); case GRANTOR_NAME: return getGrantorName(); case GRANTOR_PRINCIPAL_TYPE: return getGrantorPrincipalType(); } throw new IllegalStateException(); }
public static RoleGrant fromRolePrincipalGrant(RolePrincipalGrant grant) { return new RoleGrant( new PrestoPrincipal(fromMetastoreApiPrincipalType(grant.getPrincipalType()), grant.getPrincipalName()), grant.getRoleName(), grant.isGrantOption()); }
public HiveRoleGrant(RolePrincipalGrant thriftRoleGrant) { this.roleName = thriftRoleGrant.getRoleName(); this.principalName = thriftRoleGrant.getPrincipalName(); this.principalType = thriftRoleGrant.getPrincipalType().name(); this.grantOption = thriftRoleGrant.isGrantOption(); this.grantTime = thriftRoleGrant.getGrantTime(); this.grantor = thriftRoleGrant.getGrantorName(); this.grantorType = thriftRoleGrant.getGrantorPrincipalType() == null ? null : thriftRoleGrant.getGrantorPrincipalType().name(); }