<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>ModeImpl cannot be resolved to a type</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118452930" />
  <subtitle>ModeImpl cannot be resolved to a type</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118452930</id>
  <updated>2026-04-06T10:13:51Z</updated>
  <dc:date>2026-04-06T10:13:51Z</dc:date>
  <entry>
    <title>RE: ModeImpl cannot be resolved to a type</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118454606" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118454606</id>
    <updated>2020-02-07T16:52:11Z</updated>
    <published>2020-02-07T16:52:11Z</published>
    <summary type="html">Again, this was wrong.&lt;br /&gt;&lt;br /&gt;Instead, in ModelLocalServiceImpl, you should have just called &amp;#34;createModel(0);&amp;#34; and let Liferay construct one properly.&lt;br /&gt;&lt;br /&gt;Oh, and the way you did it in 6.2 was also wrong, it should have been createModel(0) there too.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2020-02-07T16:52:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: ModeImpl cannot be resolved to a type</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118456139" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118456139</id>
    <updated>2020-02-07T12:51:36Z</updated>
    <published>2020-02-07T12:51:36Z</published>
    <summary type="html">Thanks Olaf for your quick response.I did like this.InModeLocalServiceIml classgetInstance(){Model model=new ModelImpl()&lt;br /&gt;return model;}</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2020-02-07T12:51:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: ModeImpl cannot be resolved to a type</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118450682" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118450682</id>
    <updated>2020-02-07T10:28:01Z</updated>
    <published>2020-02-07T10:28:01Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Pankaj Kumar:&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;In 6.2 we are able to instance ModleImpl.e.g&lt;br /&gt;Model model=new ModelImpl();but in Liferay 7.2  we cannot do it.Can  any body tell me how we can do this in Liferay 7.2 version.&lt;br /&gt;&lt;/blockquote&gt;It&amp;#39;s wrong to instantiate a ModelImpl directly in client code: Encapsulate it in a service and hand it out. &lt;br /&gt;You want client code to purely be dependent on the interface, so that you can hand out any kind of wrapper at any time. Your client code is only dependent on the api, never on the service implementation. &lt;br /&gt;It was always wrong (bad style) to access implementation classes. Luckily now it&amp;#39;s also impossible without going through hoops. Don&amp;#39;t go through hoops - have your service provide whatever it wants, under the Model interface.</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2020-02-07T10:28:01Z</dc:date>
  </entry>
  <entry>
    <title>ModeImpl cannot be resolved to a type</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118452929" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118452929</id>
    <updated>2020-02-07T09:59:56Z</updated>
    <published>2020-02-07T09:59:56Z</published>
    <summary type="html">Hi All,&lt;br /&gt;In 6.2 we are able to instance ModleImpl.e.g&lt;br /&gt;Model model=new ModelImpl();but in Liferay 7.2  we cannot do it.Can  any body tell me how we can do this in Liferay 7.2 version.&lt;br /&gt;Thanks,Pankaj Semwal</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2020-02-07T09:59:56Z</dc:date>
  </entry>
</feed>
