Codota Logo
Customer
Code IndexAdd Codota to your IDE (free)

How to use
Customer
in
it.tidalwave.accounting.model

Best Java code snippets using it.tidalwave.accounting.model.Customer (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: it.tidalwave.accounting/it-tidalwave-accounting-ui-customerexplorer

 /*******************************************************************************************************************
  *
  * Creates a {@link PresentationModel} for a {@link Customer} injecting a {@link Selectable} role which fires a
  * {@link CustomerSelectedEvent} on selection.
  * 
  * @param  customer     the {@code Customer}
  * @return              the {@code PresentationModel}
  *
  ******************************************************************************************************************/
 @Nonnull
 @VisibleForTesting PresentationModel createPresentationModelFor (final @Nonnull Customer customer)
  {
   final Selectable publishEventOnSelection = () -> messageBus.publish(new CustomerSelectedEvent(customer));
   return customer.as(Presentable).createPresentationModel(publishEventOnSelection);
  }
}
origin: it.tidalwave.accounting/it-tidalwave-accounting-ui-projectexplorer

/*******************************************************************************************************************
 *
 * Reacts to the notification that a {@link Customer} has been selected by populating the presentation with
 * his projects.
 * 
 * @param  event  the notification event
 *
 ******************************************************************************************************************/
@VisibleForTesting void onCustomerSelectedEvent (final @Nonnull @ListensTo CustomerSelectedEvent event)
 {
  log.info("onCustomerSelectedEvent({})", event);
  presentation.populate(event.getCustomer().findProjects()
                       .stream()
                       .map(project -> (ProjectSpi)project)
                       .sorted(comparing(ProjectSpi::getName))
                       .map(project -> createPresentationModelFor(project))
                       .collect(toCompositePresentationModel()));
 }

origin: it.tidalwave.accounting/it-tidalwave-accounting-marshalling-xml

public CustomerXml (final @Nonnull Customer customer)
 {
  final Customer.Builder builder = customer.toBuilder();
  this.id = builder.getId();
  this.name = builder.getName();
  this.billingAddressXml = new AddressXml(builder.getBillingAddress());
  this.vatNumber = builder.getVatNumber();
 }

origin: it.tidalwave.accounting/it-tidalwave-accounting-model-impl-inmemory

 @Test
 public void toString_must_return_all_the_fields()
  {
   final Address a1 = Address.builder().withStreet("Foo Bar rd 20")
                     .withCity("San Francisco")
                     .withZip("12345")
                     .withState("CA")
                     .withCountry("USA")
                     .create();
   final Customer c1 = Customer.builder().withId(new Id("the id"))
                      .withName("Acme Corp.")
                      .withVatNumber("1233455345")
                      .withBillingAddress(a1)
                      .create();
   assertThat(c1.toString(), is("InMemoryCustomer(id=the id, name=Acme Corp., billingAddress=Address(street=Foo Bar rd 20, "
                 + "city=San Francisco, state=CA, country=USA, zip=12345), vatNumber=1233455345)"));
  }
}
origin: it.tidalwave.accounting/it-tidalwave-accounting-model-impl-inmemory

                  .withCountry("USA")
                  .create();
final Customer c1 = Customer.builder().withId(new Id("1"))
                   .withName("Acme Corp.")
                   .withVatNumber("1233455345")
it.tidalwave.accounting.modelCustomer

Javadoc

This class models a customer.

Most used methods

  • as
  • builder
  • findProjects
  • toBuilder

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now