congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Case
Code IndexAdd Tabnine to your IDE (free)

How to use
Case
in
com.ning.billing.catalog.rules

Best Java code snippets using com.ning.billing.catalog.rules.Case (Showing top 6 results out of 315)

origin: com.ning.billing/killbill-catalog

public T getResult(final PlanSpecifier planPhase, final StandaloneCatalog c) throws CatalogApiException {
  if (satisfiesCase(planPhase, c)) {
    return getResult();
  }
  return null;
}
origin: com.ning.billing/killbill-catalog

protected boolean satisfiesCase(final PlanSpecifier planPhase, final StandaloneCatalog c) throws CatalogApiException {
  return (getProduct() == null || getProduct().equals(c.findCurrentProduct(planPhase.getProductName()))) &&
      (getProductCategory() == null || getProductCategory().equals(planPhase.getProductCategory())) &&
      (getBillingPeriod() == null || getBillingPeriod().equals(planPhase.getBillingPeriod())) &&
      (getPriceList() == null || getPriceList().equals(c.findCurrentPriceList(planPhase.getPriceListName())));
}
origin: com.ning.billing/killbill-catalog

public static <K> K getResult(final Case<K>[] cases, final PlanSpecifier planSpec, final StandaloneCatalog catalog) throws CatalogApiException {
  if (cases != null) {
    for (final Case<K> c : cases) {
      final K result = c.getResult(planSpec, catalog);
      if (result != null) {
        return result;
      }
    }
  }
  return null;
}
origin: com.ning.billing/killbill-catalog

public PlanAlignmentCreate getPlanCreateAlignment(final PlanSpecifier specifier, final StandaloneCatalog catalog) throws CatalogApiException {
  return Case.getResult(createAlignmentCase, specifier, catalog);
}
origin: com.ning.billing/killbill-catalog

private DefaultPriceList findPriceList(final PlanSpecifier specifier, final StandaloneCatalog catalog) throws CatalogApiException {
  DefaultPriceList result = Case.getResult(priceListCase, specifier, catalog);
  if (result == null) {
    result = catalog.findCurrentPriceList(specifier.getPriceListName());
  }
  return result;
}
origin: com.ning.billing/killbill-catalog

    Result.LALA);
final Result r1 = Case.getResult(new CaseResult[]{cr0, cr1, cr2, cr3},
                 new PlanSpecifier(product.getName(), product.getCategory(), BillingPeriod.MONTHLY, priceList.getName()), cat);
Assert.assertEquals(r1, Result.FOO);
final Result r2 = Case.getResult(new CaseResult[]{cr0, cr1, cr2},
                 new PlanSpecifier(product.getName(), product.getCategory(), BillingPeriod.ANNUAL, priceList.getName()), cat);
Assert.assertEquals(r2, Result.DIPSY);
com.ning.billing.catalog.rulesCase

Most used methods

  • getResult
  • getBillingPeriod
  • getPriceList
  • getProduct
  • getProductCategory
  • satisfiesCase

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Collectors (java.util.stream)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now