Package org.applause.lang.applauseDsl

Examples of org.applause.lang.applauseDsl.DataSource


    return _head;
  }
 
  public DataSourceAccessMethod deleteMethod(final Screen it) {
    DataSourceCall _datasource = it.getDatasource();
    DataSource _datasource_1 = _datasource.getDatasource();
    EList<DataSourceAccessMethod> _methods = _datasource_1.getMethods();
    final Function1<DataSourceAccessMethod,Boolean> _function = new Function1<DataSourceAccessMethod,Boolean>() {
      public Boolean apply(final DataSourceAccessMethod it) {
        RESTSpecification _restSpecification = it.getRestSpecification();
        RESTVerb _verb = _restSpecification.getVerb();
        boolean _equals = Objects.equal(_verb, RESTVerb.DELETE);
View Full Code Here


  @org.jnario.runner.Extension
  public EntityDataAccessModuleFileCompiler _entityDataAccessModuleFileCompiler;
 
  private DataSource datasource(final CharSequence input, final String datasourceName) {
    try {
      DataSource _xblockexpression = null;
      {
        final Model model = this._parseHelper.parse(input);
        EList<NamedElement> _elements = model.getElements();
        Iterable<DataSource> _filter = Iterables.<DataSource>filter(_elements, DataSource.class);
        final Function1<DataSource,Boolean> _function = new Function1<DataSource,Boolean>() {
          public Boolean apply(final DataSource it) {
            String _name = it.getName();
            boolean _equals = Objects.equal(_name, datasourceName);
            return Boolean.valueOf(_equals);
          }
        };
        DataSource _findFirst = IterableExtensions.<DataSource>findFirst(_filter, _function);
        _xblockexpression = (_findFirst);
      }
      return _xblockexpression;
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
View Full Code Here

      throw Exceptions.sneakyThrow(_e);
    }
  }
 
  public void isGeneratedHeaderFileFromModel(final CharSequence expectedGeneratedCode, final String dataSourceName, final CharSequence input) {
    final DataSource datasource = this.datasource(input, dataSourceName);
    final CharSequence result = this._entityDataAccessHeaderFileCompiler.compileHeaderFile(datasource);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
  }
 
  public void isGeneratedModuleFileFromModel(final CharSequence expectedGeneratedCode, final String dataSourceName, final CharSequence input) {
    final DataSource datasource = this.datasource(input, dataSourceName);
    final CharSequence result = this._entityDataAccessModuleFileCompiler.compileModuleFile(datasource);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

  public void dataSourceAccessMethodUrlShouldBe(final CharSequence sequence, final String url) {
    try {
      final Model model = this._parseHelper.parse(sequence);
      EList<NamedElement> _elements = model.getElements();
      Iterable<DataSource> _filter = Iterables.<DataSource>filter(_elements, DataSource.class);
      final DataSource datasource = IterableExtensions.<DataSource>head(_filter);
      EList<DataSourceAccessMethod> _methods = datasource.getMethods();
      final DataSourceAccessMethod method = IterableExtensions.<DataSourceAccessMethod>head(_methods);
      RESTSpecification _restSpecification = method.getRestSpecification();
      RESTURL _path = _restSpecification.getPath();
      String _value = this._rESTURLExtensions.value(_path);
      Matcher<String> _is = CoreMatchers.<String>is(url);
View Full Code Here

  public void baseUrlShouldBe(final CharSequence sequence, final String url) {
    try {
      final Model model = this._parseHelper.parse(sequence);
      EList<NamedElement> _elements = model.getElements();
      Iterable<DataSource> _filter = Iterables.<DataSource>filter(_elements, DataSource.class);
      final DataSource datasource = IterableExtensions.<DataSource>head(_filter);
      final AbsoluteRESTURL baseUrl = datasource.getBaseUrl();
      String _value = this._rESTURLExtensions.value(baseUrl);
      Matcher<String> _is = CoreMatchers.<String>is(url);
      Assert.<String>assertThat(_value, _is);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
View Full Code Here

@SuppressWarnings("all")
public class DefaultListScreenClassExtensions extends ScreenClassExtensions {
  public Entity resourceType(final Screen it) {
    DataSourceCall _datasource = it.getDatasource();
    DataSource _datasource_1 = _datasource.getDatasource();
    Entity _resourceType = _datasource_1.getResourceType();
    return _resourceType;
  }
View Full Code Here

    _builder.append(_controllerClassName_1, "");
    _builder.newLineIfNotEmpty();
    _builder.newLine();
    _builder.append("static NSString *kCellIdentifier = @\"");
    DataSourceCall _datasource = it.getDatasource();
    DataSource _datasource_1 = _datasource.getDatasource();
    Entity _resourceType_1 = _datasource_1.getResourceType();
    String _typeName = this._typeExtensions.typeName(_resourceType_1);
    _builder.append(_typeName, "");
    _builder.append("Cell\";");
    _builder.newLineIfNotEmpty();
    _builder.newLine();
View Full Code Here

*/
@SuppressWarnings("all")
public class ApplauseDslScopeProvider extends AbstractDeclarativeScopeProvider {
  public IScope scope_RESTMethodCall_restMethod(final RESTMethodCall ctx, final EReference ref) {
    DataSourceCall _datasource = ctx.getDatasource();
    DataSource _datasource_1 = _datasource.getDatasource();
    EList<DataSourceAccessMethod> _methods = _datasource_1.getMethods();
    IScope _scopeFor = Scopes.scopeFor(_methods);
    return _scopeFor;
  }
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public void setDatasource(DataSource newDatasource)
  {
    DataSource oldDatasource = datasource;
    datasource = newDatasource;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.DATA_SOURCE_CALL__DATASOURCE, oldDatasource, datasource));
  }
View Full Code Here

TOP

Related Classes of org.applause.lang.applauseDsl.DataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.