Tabnine Logo
Customer
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • BoxLayout (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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