Checks if the operated account is a direct child of effective account
@param operatedAccount
@return
11101
public boolean isDirectChildOfAccount(final Account effectiveAccount,
            final Account operatedAccount) {
        return operatedAccount.getParentSid().equals(effectiveAccount.getSid());
    }
991716
public final GoogleAccountCredential setSelectedAccountName(String accountName) {
    selectedAccount = accountManager.getAccountByName(accountName);
    // check if account has been deleted
    this.accountName = selectedAccount == null ? null : accountName;
    return this;
  }
10849
public final boolean isParentItem(int adapterPosition) {
        int itemCount = 0;

        int parentCount = parentItemCount();
        for (int i = 0; i < parentCount; i++) {
            if (itemCount == adapterPosition) {
                return true;
            }

            itemCount += 1;

            if (isExpanded(i)) {
                itemCount += childItemCount(i);
            } else {
                // itemCount += 1;
            }
        }

        return false;
    }
64518
private boolean checkIfActiveOidExisting(String oid) {
        try {
            JPAObject obj = dao.getJPAObject(oid);
            if (!obj.isDeleted()) {
                return true;
            }
        } catch (EDBException e) {
            // nothing to do here
        }
        return false;
    }
427228
def DisplayAccountTree(account, accounts, links, depth=0):
  
  prefix = '-' * depth * 2
  print '%s%s, %s' % (prefix, account['customerId'], account['name'])
  if account['customerId'] in links:
    for child_link in links[account['customerId']]:
      child_account = accounts[child_link['clientCustomerId']]
      DisplayAccountTree(child_account, accounts, links, depth + 1)
741040
private static NodeAVL child(PersistentStore store, NodeAVL x,
                                 boolean isleft) {
        return isleft ? x.getLeft(store)
                      : x.getRight(store);
    }
1314062
public InvoiceItemModelDao computeCBAComplexity(final InvoiceModelDao invoice,
                                                    @Nullable final BigDecimal accountCBAOrNull,
                                                    @Nullable final EntitySqlDaoWrapperFactory entitySqlDaoWrapperFactory,
                                                    final InternalCallContext context) throws EntityPersistenceException, InvoiceApiException {
        final BigDecimal balance = getInvoiceBalance(invoice);

        if (balance.compareTo(BigDecimal.ZERO) < 0) {
            // Current balance is negative, we need to generate a credit (positive CBA amount)
            return buildCBAItem(invoice, balance, context);
        } else if (balance.compareTo(BigDecimal.ZERO) > 0 && invoice.getStatus() == InvoiceStatus.COMMITTED && !invoice.isWrittenOff()) {
            // Current balance is positive and the invoice is COMMITTED, we need to use some of the existing if available (negative CBA amount)
            // PERF: in some codepaths, the CBA maybe have already been computed
            BigDecimal accountCBA = accountCBAOrNull;
            if (accountCBAOrNull == null) {
                accountCBA = getAccountCBAFromTransaction(entitySqlDaoWrapperFactory, context);
            }

            if (accountCBA.compareTo(BigDecimal.ZERO) <= 0) {
                return null;
            }
            final BigDecimal positiveCreditAmount = accountCBA.compareTo(balance) > 0 ? balance : accountCBA;
            return buildCBAItem(invoice, positiveCreditAmount, context);
        } else {
            // 0 balance, nothing to do.
            return null;
        }
    }
1181379
public final boolean isTransactional() {
        // Take a snapshot of the value with first use (or reuse from pool) of the managed connection.
        // This value will be cleared when the managed connection is returned to the pool.
        if (transactional == null) {
            transactional = mcf.dsConfig.get().transactional;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(this, tc, "transactional=", transactional);
        }

        return transactional;
    }
633209
public static boolean hasOperationType(Operation operation, Class<? extends Operation> operationType)
    {
        if (operation == null)
            return false;

        if (operationType.isAssignableFrom(operation.getClass()))
            return true;

        if (operation instanceof CompositeOperation)
        {
            List<Operation> operations = ((CompositeOperation) operation).getOperations();
            for (Operation childOperation : operations)
            {
                if (hasOperationType(childOperation, operationType))
                    return true;
            }
        }

        return false;
    }
994937
public boolean isOUManagable(String ou) {

        if (m_isRootAccountManager) {
            return true;
        }

        if (OpenCms.getRoleManager().hasRole(m_cms, CmsRole.ACCOUNT_MANAGER.forOrgUnit(""))) {
            System.out.println("easy");
            return true;
        }

        return m_managableOU.contains(assureOUString(ou));
    }
798890
private EntityPermission getPermission(Action operation) {
    EntityPermission result;
    switch (operation) {
      case COUNT:
      case READ:
        result = EntityPermission.READ;
        break;
      case UPDATE:
        result = EntityPermission.UPDATE;
        break;
      case DELETE:
        result = EntityPermission.DELETE;
        break;
      case CREATE:
        throw new UnexpectedEnumException(Action.CREATE);
      default:
        throw new IllegalArgumentException("Illegal operation");
    }
    return result;
  }
465469
public static Sid getOrganizationSidByAccountSid(DaoManager storage, final Sid accountSid) {
        return storage.getAccountsDao().getAccount(accountSid).getOrganizationSid();
    }
588216
@Override
    public final Map<String, OperationEntry> getOperationDescriptions(final PathAddress address, boolean inherited) {

        if (parent != null) {
            RootInvocation ri = getRootInvocation();
            return ri.root.getOperationDescriptions(ri.pathAddress.append(address), inherited);
        }
        // else we are the root
        Map<String, OperationEntry> providers = new TreeMap<String, OperationEntry>();
        getOperationDescriptions(address.iterator(), providers, inherited);
        return providers;
    }
214761
def cloneaccount(ctx, account_name, account):
    
    from bitsharesbase import transactions, operations

    account = Account(account)
    op = {
        "fee": {"amount": 0, "asset_id": "1.3.0"},
        "registrar": account["id"],
        "referrer": account["id"],
        "referrer_percent": 100,
        "name": account_name,
        "owner": account["owner"],
        "active": account["active"],
        "options": account["options"],
        "extensions": {},
        "prefix": ctx.bitshares.rpc.chain_params["prefix"],
    }
    op = operations.Account_create(**op)
    print_tx(ctx.bitshares.finalizeOp(op, account, "active"))
905911
private boolean isJobSuccessful(String objectName) {
    LOG.trace("Checking if job completed successfull for {}", objectName);
    if (cachedSparkJobsStatus.containsKey(objectName)) {
      return cachedSparkJobsStatus.get(objectName).booleanValue();
    }
    final String obj = objectName;
    final Account account = mJossAccount.getAccount();
    LOG.trace("HEAD {}", obj + "/" + HADOOP_SUCCESS);
    final StoredObject so = account.getContainer(container).getObject(
            obj + "/" + HADOOP_SUCCESS
    );
    Boolean isJobOK = Boolean.FALSE;
    if (so.exists()) {
      LOG.debug("{} exists", obj + "/" + HADOOP_SUCCESS);
      isJobOK = Boolean.TRUE;
    }
    cachedSparkJobsStatus.put(objectName, isJobOK);
    return isJobOK.booleanValue();
  }
961831
@Override
    public boolean isSupported(Task task) {
        return task.getType().equals(Task.Type.AUDIT);
    }
258147
public OvhAccount domain_account_accountName_GET(String domain, String accountName) throws IOException {
		String qPath = "/email/domain/{domain}/account/{accountName}";
		StringBuilder sb = path(qPath, domain, accountName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhAccount.class);
	}